## PalinDrone

View as PDF

Points: 12 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem type

You've finished (or at least tried... hopefully) fixing up ButaneBot's OR-sum and Sokoban programs! Now you need to enter ButaneBot's files and update the code. There is a single problem now... to update the code you need to enter ButaneBot's security password, which Butane implemented to stop users from tampering with his files. ButaneBot cannot recall the password, but he remembers that it was a single integer under . He also remembers that the number is a palindrome. Before you begin coding a brute force check-all-palindromes program to hack into ButaneBot's files, you would like to know how many possible passwords there could be to make sure the program won't run on forever. Since this number may be very big, output the answer modulo .

#### Input Specification

The only line of input will contain a single integer, .

You can assume that 80% of test cases will have .

#### Output Specification

The number of palindromes under .

#### Sample Input

2

#### Sample Output

18

The palindromes less than or equal to are:

• commented on Dec. 8, 2018, 2:16 p.m.

why am I WA'ing on test case 4

• commented on Dec. 30, 2020, 6:25 a.m.

I found the N value to be 3849 for question 4, but still got no idea what is wrong with the answer

• commented on Dec. 30, 2020, 11:14 a.m.

"Since this number may be very big, output the answer modulo 1 000 000 000 ."

Also, your solution is too slow. For the later cases it will TLE.

• commented on Dec. 30, 2020, 12:39 p.m.

Thank you for your response, by the way, this question really takes me hours to solve bc I didn't know it says "result = result% 1 Billion"

• commented on Dec. 30, 2020, 12:24 p.m.

bruh, i got 0.11s for my solution, check the list out

• commented on Feb. 21, 2017, 8:24 a.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Feb. 21, 2017, 10:08 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 18, 2015, 10:33 a.m.

typo

• commented on Dec. 18, 2015, 10:38 a.m.

Fixed