結果

問題 No.2037 NAND Pyramid
ユーザー prussian_coderprussian_coder
提出日時 2022-08-12 22:18:27
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 3,148 ms
コンパイル使用メモリ 81,644 KB
実行使用メモリ 105,320 KB
最終ジャッジ日時 2023-10-24 10:29:59
合計ジャッジ時間 5,026 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,424 KB
testcase_01 AC 37 ms
53,424 KB
testcase_02 AC 37 ms
53,424 KB
testcase_03 AC 36 ms
53,424 KB
testcase_04 AC 37 ms
53,424 KB
testcase_05 AC 38 ms
53,424 KB
testcase_06 AC 36 ms
53,424 KB
testcase_07 AC 95 ms
92,364 KB
testcase_08 AC 80 ms
89,316 KB
testcase_09 AC 94 ms
90,980 KB
testcase_10 AC 55 ms
73,444 KB
testcase_11 AC 104 ms
93,916 KB
testcase_12 AC 78 ms
84,720 KB
testcase_13 AC 59 ms
72,788 KB
testcase_14 AC 77 ms
84,048 KB
testcase_15 AC 89 ms
91,656 KB
testcase_16 AC 75 ms
83,528 KB
testcase_17 AC 60 ms
82,752 KB
testcase_18 AC 59 ms
82,756 KB
testcase_19 AC 106 ms
98,628 KB
testcase_20 AC 104 ms
98,628 KB
testcase_21 AC 124 ms
99,064 KB
testcase_22 AC 122 ms
99,068 KB
testcase_23 AC 130 ms
105,304 KB
testcase_24 AC 136 ms
105,304 KB
testcase_25 AC 67 ms
89,708 KB
testcase_26 AC 58 ms
82,700 KB
testcase_27 AC 112 ms
98,628 KB
testcase_28 AC 69 ms
89,712 KB
testcase_29 AC 60 ms
82,696 KB
testcase_30 AC 131 ms
105,320 KB
testcase_31 AC 97 ms
92,096 KB
testcase_32 AC 108 ms
98,628 KB
testcase_33 AC 48 ms
60,004 KB
testcase_34 AC 50 ms
62,380 KB
testcase_35 AC 50 ms
62,380 KB
testcase_36 AC 55 ms
64,452 KB
testcase_37 AC 52 ms
64,452 KB
testcase_38 AC 51 ms
64,428 KB
testcase_39 AC 55 ms
64,452 KB
testcase_40 AC 44 ms
59,848 KB
testcase_41 AC 46 ms
60,004 KB
testcase_42 AC 47 ms
60,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=[int(a) for a in input()]
for _ in range(2-(N-K)%2):
	B=[0]*(len(A)-1)
	for i in range(len(A)-1):
		B[i]=1-(A[i]&A[i+1])
	A=B.copy()	
t=((N-(2-(N-K)%2)-K)//2)
if t==0:
	print(*B,sep="")
else:
	print(*B[t:-t],sep="")
0