結果

問題 No.1026 OGAWA's New Keyboard
ユーザー kept1994kept1994
提出日時 2022-05-04 19:33:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 195 ms / 1,000 ms
コード長 326 bytes
コンパイル時間 226 ms
コンパイル使用メモリ 82,096 KB
実行使用メモリ 98,164 KB
最終ジャッジ日時 2024-07-03 22:42:34
合計ジャッジ時間 3,774 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
from collections import deque
import sys

def main():
    N = int(input())
    q = deque()
    for _ in range(N):
        T, S = input().split()
        if T == "0":
            q.append(S)
        else:
            q.appendleft(S)
    print(*q, sep="")
    return

if __name__ == '__main__':
    main()
0