結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー brthyyjpbrthyyjp
提出日時 2021-01-18 10:13:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 299 bytes
コンパイル時間 1,765 ms
コンパイル使用メモリ 86,460 KB
実行使用メモリ 71,564 KB
最終ジャッジ日時 2023-08-20 17:48:52
合計ジャッジ時間 3,726 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,288 KB
testcase_01 AC 73 ms
71,492 KB
testcase_02 AC 71 ms
71,160 KB
testcase_03 AC 73 ms
71,408 KB
testcase_04 AC 73 ms
71,540 KB
testcase_05 AC 74 ms
71,284 KB
testcase_06 AC 71 ms
71,352 KB
testcase_07 AC 72 ms
71,528 KB
testcase_08 AC 73 ms
71,160 KB
testcase_09 AC 73 ms
71,016 KB
testcase_10 AC 73 ms
71,244 KB
testcase_11 AC 71 ms
71,160 KB
testcase_12 AC 72 ms
71,396 KB
testcase_13 AC 72 ms
71,240 KB
testcase_14 AC 72 ms
71,220 KB
testcase_15 AC 72 ms
71,156 KB
testcase_16 AC 71 ms
71,564 KB
testcase_17 AC 72 ms
71,216 KB
testcase_18 AC 73 ms
71,384 KB
testcase_19 AC 73 ms
71,136 KB
testcase_20 AC 73 ms
71,440 KB
testcase_21 AC 73 ms
71,292 KB
testcase_22 AC 73 ms
71,344 KB
testcase_23 AC 73 ms
71,160 KB
testcase_24 AC 72 ms
71,292 KB
testcase_25 AC 73 ms
71,448 KB
testcase_26 AC 72 ms
71,488 KB
testcase_27 AC 73 ms
71,388 KB
testcase_28 AC 73 ms
71,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

c1 = str(input())
c2 = str(input())
C = c1+c2
cur = c1
cnt = 0
X = []
for c in C:
    if c == cur:
        cnt += 1
    else:
        X.append((cur, cnt))
        cnt = 1
        cur = c
else:
    X.append((cur, cnt))
ans = 0
for c, cnt in X:
    if c == 'o':
        ans = max(cnt, ans)
print(ans)
0