100 atcoder#ABC114C. [ABC114C] 755
[ABC114C] 755
Score : points
Problem Statement
You are given an integer . Among the integers between and (inclusive), how many Shichi-Go-San numbers (literally "Seven-Five-Three numbers") are there?
Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:
- When the number is written in base ten, each of the digits
7
,5
and3
appears at least once, and the other digits never appear.
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the number of the Shichi-Go-San numbers between and (inclusive).
575
4
There are four Shichi-Go-San numbers not greater than : and .
3600
13
There are Shichi-Go-San numbers not greater than : the above four numbers, and .
999999999
26484