1832: 【CSP函数】回文数个数▅
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:6
Solved:5
Description
一个正整数,正读和反读都相同的数为回文数。
例如 22 , 131 , 2442 , 37073 , 6 ,… 所有 1 位数都是回文数。
给出一个正整数 n ( 1≤n≤10000 ),求出 1,2,…,n 之中(包括 1 和 n )的回文数的个数。
Input
任意给定一个正整数 n ( 0<n≤10000 )
Output
一个正整数,表示[ 1,n ]之间的回文数的个数。
Sample Input Copy
325
Sample Output Copy
41