#abc233e. E - Σ[k=0..10^100]floor(X/10^k)
E - Σ[k=0..10^100]floor(X/10^k)
Score : points
问题陈述
求 $\displaystyle \sum_{k=0}^{10^{100}} \left \lfloor \frac{X}{10^k} \right \rfloor$.
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Find $\displaystyle \sum_{k=0}^{10^{100}} \left \lfloor \frac{X}{10^k} \right \rfloor$.
Notes
denotes the value of truncated to an integer.
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Here, the answer must be precisely printed as an integer, even if it is large. It is not allowed to use exponential notation, such as 2.33e+21
, or print unnecessary leading zeros, as in 0523
.
Sample Input 1
1225
Sample Output 1
1360
The value we seek is .
Sample Input 2
99999
Sample Output 2
111105
Beware of carries.
Sample Input 3
314159265358979323846264338327950288419716939937510
Sample Output 3
349065850398865915384738153697722542688574377708317
The values in input and output can both be enormous.
update @ 2024/3/10 10:09:00