問題一覧 > 通常問題

No.671 1000000007

レベル : / AI推定難易度 : 98 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 600
作問者 : nmnmnmnmnmnmnm / テスター : 👑 yumechi
お気に入りにしたユーザー ProblemId : 1361 / 自分の提出
問題文最終更新日: 2026-06-25 11:15:00
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 188 (順位表) の他の問題:

Problem Statement

A-kun tried to type the number 1000000007.
However, A-kun mistakenly typed the wrong number of '0's between the '1' and the '7'.
Given the value $N$ that A-kun typed, answer how much its number of 0s differs from that of 1000000007.

Input

$N$

$N$ is a positive integer whose number of 0s differs from that of 1000000007. $100 \le N \le 1000000000000000$.
When viewed as a string, $N$ begins with '1' and ends with '7'. All characters between them are '0'.

Output

Output in one line how much the number of 0s differs from that of 1000000007. Print a newline at the end.

Sample

Sample 1
Input
100000007
Output
1

There is one 0 too few. Therefore, the answer is 1.

Sample 2
Input
100000000007
Output
2

There are two 0s too many. Therefore, the answer is 2.

Sample 3
Input
100000000000007
Output
5

This is the test case with the largest $N$.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。