結果

問題 No.672 最長AB列
ユーザー 👑 H20H20
提出日時 2020-11-05 11:45:22
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 686 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 89,452 KB
最終ジャッジ日時 2023-09-29 16:50:53
合計ジャッジ時間 4,613 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,424 KB
testcase_01 AC 66 ms
71,144 KB
testcase_02 AC 65 ms
71,216 KB
testcase_03 AC 64 ms
71,044 KB
testcase_04 AC 66 ms
71,456 KB
testcase_05 AC 64 ms
71,456 KB
testcase_06 AC 63 ms
71,456 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 82 ms
89,452 KB
testcase_10 AC 84 ms
88,188 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 94 ms
81,044 KB
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import groupby
S = input()
G = groupby(S)
C = []
for key, group in G:
    C.append(len(list(group)))
ans = 0
for i in range(len(C)-1):
    ans = max(ans,min(C[i],C[i+1])*2)
print(ans)
0