結果

問題 No.1026 OGAWA's New Keyboard
ユーザー lemonlemon
提出日時 2021-05-08 14:08:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 217 ms / 1,000 ms
コード長 432 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 29,068 KB
最終ジャッジ日時 2023-10-15 00:54:02
合計ジャッジ時間 2,781 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,432 KB
testcase_01 AC 19 ms
8,552 KB
testcase_02 AC 19 ms
8,540 KB
testcase_03 AC 19 ms
8,460 KB
testcase_04 AC 217 ms
29,068 KB
testcase_05 AC 24 ms
9,084 KB
testcase_06 AC 26 ms
9,360 KB
testcase_07 AC 131 ms
20,668 KB
testcase_08 AC 23 ms
8,892 KB
testcase_09 AC 19 ms
8,432 KB
testcase_10 AC 20 ms
8,656 KB
testcase_11 AC 20 ms
8,524 KB
testcase_12 AC 19 ms
8,436 KB
testcase_13 AC 19 ms
8,572 KB
testcase_14 AC 20 ms
8,444 KB
testcase_15 AC 19 ms
8,544 KB
testcase_16 AC 20 ms
8,484 KB
testcase_17 AC 60 ms
13,484 KB
testcase_18 AC 20 ms
8,676 KB
testcase_19 AC 56 ms
12,932 KB
testcase_20 AC 19 ms
8,556 KB
testcase_21 AC 19 ms
8,412 KB
testcase_22 AC 19 ms
8,532 KB
testcase_23 AC 20 ms
8,496 KB
testcase_24 AC 107 ms
18,300 KB
testcase_25 AC 20 ms
8,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, collections
 
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
nsa = lambda: list(stdin.readline().split())
mod = 10 * 7 + 7

n = ni()
TS = [nsa() for _ in range(n)]
Ans = collections.deque()

for t, s in TS:
    if t == "0":
        Ans.append(s)
    else:
        Ans.appendleft(s)

print("".join(Ans))
0