問題一覧 > 通常問題

No.341 Period of Silence

レベル : / AI推定難易度 : 147 / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 375
作問者 : butchi_y
お気に入りにしたユーザー ProblemId : 563 / 自分の提出
問題文最終更新日: 2026-06-25 14:58:25
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 131 (順位表) の他の問題:

Problem Statement

Given a string, output the length of the longest consecutive run of the character "…".

Hint: "…" is not 3 characters.

Beginners are not recommended to solve this in C/C++ (languages in which UTF-8 is hard to handle).

Input

S

A UTF-8 string (without BOM, consisting of printable characters other than newlines) is given as $S$.
The length of the UTF-8 string is at least 1 character and at most 100 characters.

Output

Output the number of "…" in the longest consecutive run. If "…" never appears, output 0. Print a newline at the end.

Sample

Sample 1
Input
……何でもないです。
Output
2

"……" is the longest consecutive run, so the number of "…" in it is 2.

Sample 2
Input
………別に………
Output
3

"………" appears in 2 places, and the number of "…" in either one of them is 3.

Sample 3
Input
……………
Output
5

The number of "…" in "……………" is 5.

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