Given a number n, write a program that returns count of numbers from 1 to n that don’t contain digit 3 in their decimal representation.
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N.
Print the total numbers that don't contain digit 3.
1 ≤ T ≤ 100
1 ≤ N ≤ 500
31 // 3,13,23,30,31,32,33,34,35,36,37,38,39,43
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.