Count Numbers (Contest)
Count Numbers easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Count Numbers easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
Given an integer N, find all the numbers less than N which contains only digits 3, 4, and 5. Each digit should be present at least one time. Input The input contains a single integer N.
Constraints:- 1 <= N <= 1000000000 Output Print the count of such numbers which contains only digits 3, 4, and 5. Example Sample Input:- 500
Sample Output:- 4
Explanation:- 345. 435. 453, 354
Sample Input:- 1000
Sample Output:- 6
link: