結果

問題 No.341 沈黙の期間
ユーザー surprise_tanakasurprise_tanaka
提出日時 2018-11-16 03:24:34
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 270 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 7,936 KB
最終ジャッジ日時 2023-08-26 01:25:15
合計ジャッジ時間 1,109 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,844 KB
testcase_01 AC 16 ms
7,852 KB
testcase_02 AC 15 ms
7,844 KB
testcase_03 AC 16 ms
7,936 KB
testcase_04 AC 16 ms
7,884 KB
testcase_05 AC 16 ms
7,840 KB
testcase_06 AC 16 ms
7,832 KB
testcase_07 AC 15 ms
7,808 KB
testcase_08 AC 16 ms
7,768 KB
testcase_09 AC 15 ms
7,880 KB
testcase_10 AC 16 ms
7,760 KB
testcase_11 AC 15 ms
7,816 KB
testcase_12 AC 16 ms
7,808 KB
testcase_13 AC 16 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
max = 0
count = 0
if "…"  in S:
    for i in range(len(S)-1):
        if S[i] == S[i+1] and S[i] == "…":
            count += 1
        else:
            count = 0
        if max <= count + 1:
            max = count + 1
    print(max)
else:
    print(0)
0