2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate integers together in their spare time. Nikolay thinks an integer is interesting if it is a prime number. However, Asya thinks an integer is interesting i…
1150. Page Numbers Time limit: 1.0 secondMemory limit: 64 MB John Smith has decided to number the pages in his notebook from 1 to N. Please, figure out the number of zeros, ones, twos, …, nines he might need. Input One number N (1 ≤ N < 109). Output…
2031. Overturned Numbers Time limit: 1.0 second Memory limit: 64 MB Little Pierre was surfing the Internet and came across an interesting puzzle: What is the number under the car? It took some time before Pierre solved the puzzle, but eventually he u…
In the present world you frequently meet a lot of call numbers and they are going to be longer and longer. You need to remember such a kind of numbers. One method to do it in an easy way is to assign letters to digits as shown in the following pictur…
1118. Nontrivial Numbers Time limit: 2.0 secondMemory limit: 64 MB Specialists of SKB Kontur have developed a unique cryptographic algorithm for needs of information protection while transmitting data over the Internet. The main advantage of the algo…