結果
問題 | No.341 沈黙の期間 |
ユーザー | Fullmoon85072 |
提出日時 | 2020-08-03 22:40:53 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 76 ms / 5,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 296 ms |
コンパイル使用メモリ | 86,992 KB |
実行使用メモリ | 71,456 KB |
最終ジャッジ日時 | 2023-10-11 18:43:12 |
合計ジャッジ時間 | 2,810 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 75 ms
71,384 KB |
testcase_01 | AC | 73 ms
70,948 KB |
testcase_02 | AC | 75 ms
71,020 KB |
testcase_03 | AC | 74 ms
71,308 KB |
testcase_04 | AC | 76 ms
70,948 KB |
testcase_05 | AC | 73 ms
71,340 KB |
testcase_06 | AC | 74 ms
71,204 KB |
testcase_07 | AC | 74 ms
71,368 KB |
testcase_08 | AC | 73 ms
71,192 KB |
testcase_09 | AC | 76 ms
71,456 KB |
testcase_10 | AC | 73 ms
71,208 KB |
testcase_11 | AC | 74 ms
71,120 KB |
testcase_12 | AC | 75 ms
71,392 KB |
testcase_13 | AC | 74 ms
71,424 KB |
ソースコード
S = input() max_length = 0 count = 0 prev_ch = '' for ch in S: if ch == '…': count += 1 else: if prev_ch == '…': max_length = max(count, max_length) count = 0 prev_ch = ch max_length = max(count, max_length) print(max_length)