Count numbers containing 4
Submissions: 5914   Accuracy:

34.77%

  Difficulty: Basic   Marks: 1

Count the numbers between 1 to N containing 4 as a digit.

Input:
Each line will contain the number of test cases T.Each test case will contain a number N.

Output:
Print the count of numbers for each test case in
a separate line.

Constraints:
1<=T<=100
1<=N<=106

Example:
Input:
2
9
3

Output:
1
0

** For More Input/Output Examples Use 'Expected Output' option **

Author: shubhamdhingra77


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.