結果

問題 No.341 沈黙の期間
ユーザー kyo1
提出日時 2020-10-06 21:27:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 37 ms / 5,000 ms
コード長 253 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-20 03:01:17
合計ジャッジ時間 1,497 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()

t = "…"

res = 0
cnt = 0

i = 0

while i < len(S):
    cnt = 0
    if S[i] == t:
        cnt += 1
    while i + 1 < len(S) and S[i] == t and S[i] == S[i + 1]:
        i += 1
        cnt += 1
    res = max(res, cnt)
    i += 1

print(res)
0