結果

問題 No.2037 NAND Pyramid
ユーザー 👑 rin204rin204
提出日時 2022-08-15 20:38:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 236 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 117,288 KB
最終ジャッジ日時 2024-04-10 07:13:54
合計ジャッジ時間 5,455 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,192 KB
testcase_01 AC 37 ms
52,340 KB
testcase_02 AC 37 ms
52,428 KB
testcase_03 AC 37 ms
52,824 KB
testcase_04 AC 37 ms
52,892 KB
testcase_05 AC 38 ms
52,988 KB
testcase_06 AC 37 ms
52,552 KB
testcase_07 AC 99 ms
105,372 KB
testcase_08 AC 84 ms
101,716 KB
testcase_09 AC 96 ms
102,712 KB
testcase_10 AC 61 ms
86,644 KB
testcase_11 AC 105 ms
105,492 KB
testcase_12 AC 79 ms
90,696 KB
testcase_13 AC 59 ms
76,636 KB
testcase_14 AC 80 ms
94,936 KB
testcase_15 AC 94 ms
103,688 KB
testcase_16 AC 77 ms
94,544 KB
testcase_17 AC 76 ms
106,264 KB
testcase_18 AC 75 ms
106,616 KB
testcase_19 AC 111 ms
112,600 KB
testcase_20 AC 113 ms
112,504 KB
testcase_21 AC 136 ms
114,672 KB
testcase_22 AC 134 ms
114,772 KB
testcase_23 AC 136 ms
117,256 KB
testcase_24 AC 138 ms
117,272 KB
testcase_25 AC 76 ms
106,220 KB
testcase_26 AC 75 ms
106,236 KB
testcase_27 AC 112 ms
112,868 KB
testcase_28 AC 76 ms
106,180 KB
testcase_29 AC 76 ms
105,940 KB
testcase_30 AC 138 ms
117,288 KB
testcase_31 AC 111 ms
111,720 KB
testcase_32 AC 114 ms
112,868 KB
testcase_33 AC 43 ms
60,400 KB
testcase_34 AC 48 ms
62,972 KB
testcase_35 AC 49 ms
63,900 KB
testcase_36 AC 50 ms
64,268 KB
testcase_37 AC 49 ms
63,712 KB
testcase_38 AC 48 ms
63,928 KB
testcase_39 AC 49 ms
65,280 KB
testcase_40 AC 43 ms
60,180 KB
testcase_41 AC 47 ms
60,024 KB
testcase_42 AC 42 ms
59,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
S = list(map(int, input()))
T = [1 ^ (S[i] & S[i + 1]) for i in range(n - 1)]
x = (len(T) - k) // 2
T = T[x:len(T) - x]
if len(T) != k:
    T = [1 ^ (T[i] & T[i + 1]) for i in range(k)]
print(*T, sep="")
0