C. 数数 (count)

    Type: Default File IO: count 1000ms 256MiB

数数 (count)

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.

[丛雨]新买了一本书,这本书的页码是从 1n1-n 编号的连续整数:1,2,3,...,n1, 2, 3, ... , n 。请你帮她求出全部页码中所有单个数字的和,例如第 123123 页,它的和就是 1+2+3=61 + 2 + 3 = 6

输入格式(count.in)

一行一个正整数 nn

输出格式(count.out)

一行一个正整数,代表所有单个数字的和。

输入样例

3456789

输出样例

96342015

数据范围

对于 100%100\% 的数据,保证 1n1091 \le n \le 10^9

0927

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2024-9-27 14:00
End at
2024-9-27 17:30
Duration
3.5 hour(s)
Host
Partic.
44