Given a range from low to high and a number K. The task is to count the number which has the unit digit equal to K.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains three numbers low, high and K.
For each test case, print the count of numbers in new line.
4 9 4
3 35 3
Input : low = 3, high = 35, K = 3 Output : 4 Numbers are 3, 13, 23, 33.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.