E - <=10^n
Editorial
/
Time Limit: 2 sec / Memory Limit: 1024 MB
問題文
正整数 X が与えられます。
X\leq 10^n をみたす最小の非負整数 n を求めてください。
制約
- 1\leq X\leq 10^{100000}
- X は整数
入力
入力は以下の形式で標準入力から与えられる。
X
出力
X\leq 10^n をみたす最小の非負整数 n を出力せよ。
入力例 1
23
出力例 1
2
23>1=10^0、23>10=10^1、23\leq 100=10^2 であるため、2 を出力します。
入力例 2
1
出力例 2
0
1\leq 10^0 であるため、0 を出力します。
入力例 3
12345678901234567890
出力例 3
20
Problem Statement
Given a positive integer X, find the minimum non-negative integer n such that X\leq 10^n.
Constraints
- 1\leq X\leq 10^{100000}
- X is an integer.
Input
The input is given from Standard Input in the following format:
X
Output
Print the minimum non-negative integer n such that X\leq 10^n.
Sample Input 1
23
Sample Output 1
2
23>1=10^0, 23>10=10^1, and 23\leq 100=10^2, so 2 should be printed.
Sample Input 2
1
Sample Output 2
0
1\leq 10^0, so 0 should be printed.
Sample Input 3
12345678901234567890
Sample Output 3
20