結果

問題 No.1026 OGAWA's New Keyboard
ユーザー lloyzlloyz
提出日時 2022-07-26 00:52:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 225 ms / 1,000 ms
コード長 205 bytes
コンパイル時間 1,271 ms
コンパイル使用メモリ 86,656 KB
実行使用メモリ 86,484 KB
最終ジャッジ日時 2023-09-22 12:15:43
合計ジャッジ時間 5,516 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,436 KB
testcase_01 AC 92 ms
71,628 KB
testcase_02 AC 93 ms
71,544 KB
testcase_03 AC 94 ms
71,664 KB
testcase_04 AC 225 ms
79,508 KB
testcase_05 AC 118 ms
77,692 KB
testcase_06 AC 124 ms
77,692 KB
testcase_07 AC 196 ms
86,484 KB
testcase_08 AC 120 ms
77,676 KB
testcase_09 AC 92 ms
71,580 KB
testcase_10 AC 106 ms
76,352 KB
testcase_11 AC 101 ms
72,092 KB
testcase_12 AC 94 ms
71,548 KB
testcase_13 AC 94 ms
71,516 KB
testcase_14 AC 93 ms
71,280 KB
testcase_15 AC 93 ms
71,672 KB
testcase_16 AC 102 ms
72,060 KB
testcase_17 AC 147 ms
79,176 KB
testcase_18 AC 108 ms
76,056 KB
testcase_19 AC 141 ms
79,228 KB
testcase_20 AC 95 ms
71,744 KB
testcase_21 AC 93 ms
71,628 KB
testcase_22 AC 102 ms
71,960 KB
testcase_23 AC 105 ms
75,992 KB
testcase_24 AC 177 ms
83,620 KB
testcase_25 AC 117 ms
77,664 KB
権限があれば一括ダウンロードができます

ソースコード

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