結果

問題 No.1026 OGAWA's New Keyboard
ユーザー koba-e964koba-e964
提出日時 2020-04-29 18:31:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 112 ms / 1,000 ms
コード長 352 bytes
コンパイル時間 385 ms
コンパイル使用メモリ 87,292 KB
実行使用メモリ 87,132 KB
最終ジャッジ日時 2023-10-14 10:08:23
合計ジャッジ時間 3,753 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,612 KB
testcase_01 AC 71 ms
71,608 KB
testcase_02 AC 72 ms
71,268 KB
testcase_03 AC 71 ms
71,472 KB
testcase_04 AC 112 ms
84,848 KB
testcase_05 AC 79 ms
76,320 KB
testcase_06 AC 79 ms
76,196 KB
testcase_07 AC 110 ms
87,132 KB
testcase_08 AC 79 ms
76,248 KB
testcase_09 AC 71 ms
71,568 KB
testcase_10 AC 72 ms
71,284 KB
testcase_11 AC 70 ms
71,368 KB
testcase_12 AC 70 ms
71,224 KB
testcase_13 AC 71 ms
71,372 KB
testcase_14 AC 70 ms
71,368 KB
testcase_15 AC 71 ms
71,360 KB
testcase_16 AC 71 ms
71,444 KB
testcase_17 AC 89 ms
79,408 KB
testcase_18 AC 73 ms
71,468 KB
testcase_19 AC 89 ms
78,908 KB
testcase_20 AC 71 ms
71,276 KB
testcase_21 AC 70 ms
71,228 KB
testcase_22 AC 71 ms
71,376 KB
testcase_23 AC 71 ms
71,584 KB
testcase_24 AC 101 ms
83,400 KB
testcase_25 AC 78 ms
76,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3

import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 7)

n = int(readline())
front = []
back = []
for _ in range(n):
    t, s = readline().rstrip().split()
    if t == b'0':
        front.append(s)
    else:
        back.append(s)


back.reverse()
back.extend(front)
print(b''.join(back).decode('ascii'))
0