Lucky Numbers solution codechef
Chef Believe in Unlucky numbers according to him the numbers like 72,2020,755,834 are lucky numbers.And the Numbers like 2,5,11,999,333,7777 are unlucky numbers.
Chef have a numberfrom which he wants to calculate total number of lucky numbers that contains inside it.
Input: Lucky Numbers solution codechef
- First line will contain , number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, An integers .
Output: Lucky Numbers solution codechef
For each testcase, output in a single line answer containing the total number of lucky numbers thatcontains inside it.
Sample Input: Lucky Numbers solution codechef
The number 12 contains 2 lucky number inside it i.e 10,12 rest all are unlucky.
The number 100 contains 18 Unlucky numbers inside it that are (1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99). rest all are lucky numbers i.e 82