AtCoder Grand Contest 011
翻译中…
Problem Statement
翻译中…
We will call a non-negative integer increasing if, for any two adjacent digits in its decimal representation, the digit to the right is greater than or equal to the digit to the left. For example, $1558$, $11$, $3$ and $0$ are all increasing; $10$ and $20170312$ are not.
翻译中…
Snuke has an integer $N$. Find the minimum number of increasing integers that can represent $N$ as their sum.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10^{500000}$
翻译中…
Input
翻译中…
The input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the minimum number of increasing integers that can represent $N$ as their sum.
翻译中…
样例
Input #1
80
Output #1
2
One possible representation is $80 = 77 + 3$.
Input #2
123456789
Output #2
1
$123456789$ in itself is increasing, and thus it can be represented as the sum of one increasing integer.
Input #3
20170312
Output #3
4
Input #4
7204647845201772120166980358816078279571541735614841625060678056933503
Output #4
31
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。