結果

問題 No.1026 OGAWA's New Keyboard
ユーザー miya145592
提出日時 2023-05-19 00:51:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 202 ms / 1,000 ms
コード長 210 bytes
コンパイル時間 192 ms
コンパイル使用メモリ 82,072 KB
実行使用メモリ 109,508 KB
最終ジャッジ日時 2024-12-17 13:32:27
合計ジャッジ時間 3,209 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N = int(input())
TS = [input().split() for _ in range(N)]
ans = deque()
for t, s in TS:
    if t=="0":
        ans.append(s)
    else:
        ans.appendleft(s)
print("".join(ans))
0