Type: Default 1000ms 256MiB

回文数个数

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.

函数

Not Claimed
Status
Done
Problem
12
Open Since
2024-11-10 0:00
Deadline
2024-12-7 23:59
Extension
24 hour(s)