結果

問題 No.1026 OGAWA's New Keyboard
ユーザー lloyz
提出日時 2022-07-26 00:52:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 1,575 ms
コンパイル使用メモリ 82,272 KB
実行使用メモリ 84,552 KB
最終ジャッジ日時 2024-07-08 04:01:46
合計ジャッジ時間 3,470 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

ans = deque()
for _ in range(int(input())):
    t, s = input().split()
    if t == '0':
        ans.append(s)
    elif t == '1':
        ans.appendleft(s)
print(''.join(ans))
0