結果

問題 No.2037 NAND Pyramid
ユーザー rlangevinrlangevin
提出日時 2024-02-05 12:31:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 2,359 ms
コンパイル使用メモリ 81,444 KB
実行使用メモリ 151,792 KB
最終ジャッジ日時 2024-02-05 12:31:13
合計ジャッジ時間 8,094 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 36 ms
53,460 KB
testcase_03 AC 35 ms
53,460 KB
testcase_04 AC 35 ms
53,460 KB
testcase_05 AC 35 ms
53,460 KB
testcase_06 AC 34 ms
53,460 KB
testcase_07 AC 131 ms
144,584 KB
testcase_08 AC 116 ms
125,976 KB
testcase_09 AC 124 ms
137,324 KB
testcase_10 AC 90 ms
122,056 KB
testcase_11 AC 134 ms
139,648 KB
testcase_12 AC 94 ms
106,004 KB
testcase_13 AC 72 ms
93,280 KB
testcase_14 AC 106 ms
122,988 KB
testcase_15 AC 127 ms
143,924 KB
testcase_16 AC 103 ms
122,364 KB
testcase_17 AC 124 ms
135,624 KB
testcase_18 AC 126 ms
135,624 KB
testcase_19 AC 154 ms
144,588 KB
testcase_20 AC 154 ms
144,584 KB
testcase_21 AC 175 ms
151,792 KB
testcase_22 AC 175 ms
151,792 KB
testcase_23 AC 177 ms
151,716 KB
testcase_24 AC 177 ms
151,744 KB
testcase_25 AC 125 ms
135,480 KB
testcase_26 AC 123 ms
135,496 KB
testcase_27 AC 154 ms
144,584 KB
testcase_28 AC 122 ms
135,484 KB
testcase_29 AC 123 ms
135,496 KB
testcase_30 AC 176 ms
151,764 KB
testcase_31 AC 156 ms
144,552 KB
testcase_32 AC 164 ms
144,560 KB
testcase_33 AC 47 ms
62,248 KB
testcase_34 AC 50 ms
64,428 KB
testcase_35 AC 51 ms
64,428 KB
testcase_36 AC 53 ms
64,444 KB
testcase_37 AC 50 ms
64,436 KB
testcase_38 AC 51 ms
64,428 KB
testcase_39 AC 50 ms
64,428 KB
testcase_40 AC 46 ms
62,248 KB
testcase_41 AC 45 ms
62,248 KB
testcase_42 AC 44 ms
62,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
S = list(input())
S = list(map(int, S))
ans = [[], [], []]
ans[0] = S
for i in range(2):
    for j in range(len(ans[i]) - 1):
        ans[i + 1].append(1 - (ans[i][j]&ans[i][j+1]))

N -= K + 1
if N % 2 == 0:
    d = N // 2
    print(*ans[1][d:len(ans[1])-d], sep="")
else:
    d = N // 2
    print(*ans[2][d:len(ans[2])-d], sep="")
0