結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー maimai
提出日時 2017-05-22 06:46:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 1,000 ms
コード長 474 bytes
コンパイル時間 310 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 75,792 KB
最終ジャッジ日時 2023-08-25 23:54:36
合計ジャッジ時間 5,735 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
75,576 KB
testcase_01 AC 65 ms
75,608 KB
testcase_02 AC 63 ms
75,532 KB
testcase_03 AC 64 ms
75,532 KB
testcase_04 AC 66 ms
75,592 KB
testcase_05 AC 66 ms
75,588 KB
testcase_06 AC 67 ms
75,664 KB
testcase_07 AC 67 ms
75,536 KB
testcase_08 AC 66 ms
75,460 KB
testcase_09 AC 64 ms
75,788 KB
testcase_10 AC 65 ms
75,656 KB
testcase_11 AC 62 ms
75,460 KB
testcase_12 AC 67 ms
75,604 KB
testcase_13 AC 66 ms
75,604 KB
testcase_14 AC 65 ms
75,660 KB
testcase_15 AC 63 ms
75,556 KB
testcase_16 AC 63 ms
75,612 KB
testcase_17 AC 66 ms
75,612 KB
testcase_18 AC 66 ms
75,596 KB
testcase_19 AC 65 ms
75,464 KB
testcase_20 AC 62 ms
75,540 KB
testcase_21 AC 62 ms
75,652 KB
testcase_22 AC 65 ms
75,372 KB
testcase_23 AC 65 ms
75,536 KB
testcase_24 AC 66 ms
75,552 KB
testcase_25 AC 68 ms
75,580 KB
testcase_26 AC 66 ms
75,584 KB
testcase_27 AC 63 ms
75,536 KB
testcase_28 AC 64 ms
75,792 KB
testcase_29 AC 63 ms
75,752 KB
testcase_30 AC 62 ms
75,688 KB
testcase_31 AC 63 ms
75,684 KB
testcase_32 AC 63 ms
75,552 KB
testcase_33 AC 65 ms
75,672 KB
testcase_34 AC 63 ms
75,736 KB
testcase_35 AC 65 ms
75,604 KB
testcase_36 AC 63 ms
75,456 KB
testcase_37 AC 65 ms
75,560 KB
testcase_38 AC 62 ms
75,256 KB
testcase_39 AC 62 ms
75,604 KB
testcase_40 AC 63 ms
75,640 KB
testcase_41 AC 65 ms
75,592 KB
testcase_42 AC 66 ms
75,380 KB
testcase_43 AC 62 ms
75,600 KB
testcase_44 AC 62 ms
75,684 KB
testcase_45 AC 62 ms
75,684 KB
testcase_46 AC 65 ms
75,732 KB
testcase_47 AC 68 ms
75,368 KB
testcase_48 AC 65 ms
75,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# pythonしょしんしゃ

dd = int(input())
ll = "xxxxxxxxxxxxxxx" + input() + input() + "xxxxxxxxxxxxxxx"

result = dd
for x in range(1,30):
    d = 0
    for i in range(x, x + dd):
        if ll[i] == 'o': break
        d+=1
        # l[x] = 'o' # むり
    
    l = ll[:x]+('o'*d)+ll[x+d:]
    # print(l)
    
    nice = 0
    for c in l:
        if c == 'o':
            nice+=1
            result = max(result, nice)
        else:
            nice = 0

print(result)
0