#AT1759. C - Doubled
C - Doubled
C - Doubled
Score : $300$ points
Problem Statement
Given is an integer $N$.
How many integers $x$ between $1$ and $N$ (inclusive) satisfy the following condition?
- The decimal representation (without leading zeros) of $x$ has an even number of digits, and its first and second halves are equal as strings.
Constraints
- $N$ is an integer.
- $1 ≤ N < 10^{12}$
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
33
3
Three numbers $11$, $22$, and $33$ satisfy the condition.
1333
13
For example, the decimal representation of $1313$ has four digits, and its first and second halves are both $13$, so $1313$ satisfies the condition.
10000000
999
相关
在下列比赛中: