結果

問題 No.1026 OGAWA's New Keyboard
ユーザー kept1994kept1994
提出日時 2022-05-04 19:33:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 248 ms / 1,000 ms
コード長 326 bytes
コンパイル時間 959 ms
コンパイル使用メモリ 87,000 KB
実行使用メモリ 97,988 KB
最終ジャッジ日時 2023-09-17 00:10:35
合計ジャッジ時間 6,173 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
71,908 KB
testcase_01 AC 89 ms
71,576 KB
testcase_02 AC 90 ms
71,620 KB
testcase_03 AC 89 ms
71,812 KB
testcase_04 AC 248 ms
97,988 KB
testcase_05 AC 119 ms
77,732 KB
testcase_06 AC 120 ms
77,932 KB
testcase_07 AC 201 ms
90,040 KB
testcase_08 AC 118 ms
77,940 KB
testcase_09 AC 89 ms
71,648 KB
testcase_10 AC 106 ms
76,128 KB
testcase_11 AC 102 ms
76,456 KB
testcase_12 AC 92 ms
71,644 KB
testcase_13 AC 87 ms
71,748 KB
testcase_14 AC 88 ms
71,688 KB
testcase_15 AC 90 ms
71,748 KB
testcase_16 AC 102 ms
76,408 KB
testcase_17 AC 163 ms
83,192 KB
testcase_18 AC 104 ms
76,592 KB
testcase_19 AC 148 ms
83,004 KB
testcase_20 AC 91 ms
71,752 KB
testcase_21 AC 87 ms
71,748 KB
testcase_22 AC 98 ms
76,304 KB
testcase_23 AC 104 ms
76,460 KB
testcase_24 AC 183 ms
88,656 KB
testcase_25 AC 114 ms
77,612 KB
権限があれば一括ダウンロードができます

ソースコード

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