回文数个数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
输入一个正整数n,求1~n之间“回文数”的个数。回文数是指一个数倒过来和原数一样,如12121、11、1221、1是回文数,而1231不是回文数。
Format
Input
一行一个正整数n,1≤n≤10000。
Output
一行一个正整数,表示1~n之间回文数的个数,包括1和n。
Samples
12
10
Limitation
1s, 64Mb for each test case.