結果
問題 |
No.2037 NAND Pyramid
|
ユーザー |
👑 ![]() |
提出日時 | 2025-08-13 00:37:09 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 198 ms / 2,000 ms |
コード長 | 479 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 81,852 KB |
実行使用メモリ | 139,740 KB |
最終ジャッジ日時 | 2025-08-13 00:37:18 |
合計ジャッジ時間 | 7,613 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 39 |
ソースコード
""" 111011100 1101110 10111 011 1 """ import sys from collections import deque N,K = map(int,input().split()) S = list(map(int,list(input()))) for i in range(min(N-K,2)): T = [ (S[i]&S[i+1])^1 for i in range(len(S)-1) ] S = T if len(S) == K: print (*S,sep="") sys.exit() S = deque(S) while len(S) > K+1: S.pop() S.popleft() S = list(S) while len(S) > K: T = [ (S[i]&S[i+1])^1 for i in range(len(S)-1) ] S = T print (*S,sep="")