Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2)
翻译中…
Let's define $S(x)$ to be the sum of digits of number $x$ written in decimal system. For example, $S(5) = 5$, $S(10) = 1$, $S(322) = 7$.
翻译中…
We will call an integer $x$ interesting if $S(x + 1) \lt S(x)$. In each test you will be given one integer $n$. Your task is to calculate the number of integers $x$ such that $1 \le x \le n$ and $x$ is interesting.
翻译中…
Input
翻译中…
The first line contains one integer $t$ ($1 \le t \le 1000$) — number of test cases.
翻译中…
Then $t$ lines follow, the $i$-th line contains one integer $n$ ($1 \le n \le 10^9$) for the $i$-th test case.
翻译中…
Output
翻译中…
Print $t$ integers, the $i$-th should be the answer for the $i$-th test case.
翻译中…
Note
翻译中…
The first interesting number is equal to $9$.
翻译中…
样例
Input #1
5
1
9
10
34
880055535
Output #1
0
1
1
3
88005553
InputCopy
OutputCopy
题目信息
题号
1553A
时间限制
1 s
内存限制
256 MB
标签
数学
数论
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。