結果

問題 No.1026 OGAWA's New Keyboard
ユーザー tamato
提出日時 2020-04-14 16:45:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 121 ms / 1,000 ms
コード長 365 bytes
コンパイル時間 382 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 89,856 KB
最終ジャッジ日時 2024-09-16 05:00:00
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    from collections import deque
    input = sys.stdin.readline

    A = deque()
    N = int(input())
    for _ in range(N):
        t, s = input().split()
        if t == "0":
            A.append(s)
        else:
            A.appendleft(s)
    print("".join(A))


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