The favorite numbers of Santa Cl
Santa Claus liked play with numbers and figures. most of all he liked a number 1, however 1.01 begins New Year.
Years passed, but he stayed be of superstitious – he didn’t like numbers, in which 3 stand after 1, I mean it create 13 number. On New Year he decided give new problem: count, how many favorite simple numbers of Santa Claus which contains on interval [À, Â]?
Specifications
Input
One line, which contains 2 numbers: start and finish of interval. 1 ≤ À, Â ≤ 500000.
Output
One number is quantity of favorite simple numbers of Santa Claus.
Problem information
Time Limit: 1 secondsMemory Limit: 64 MB
Balls for the passed test: 8.33333
Complexity: 42% 251/433
Classes: Number theory
Example
Example input9 23 |
Example output4 |
| ← Queen and pawn | Problems | The word of sponsor → |
