結果

問題 No.1026 OGAWA's New Keyboard
ユーザー 双六双六
提出日時 2020-08-05 16:12:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 395 ms / 1,000 ms
コード長 449 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 11,964 KB
実行使用メモリ 10,656 KB
最終ジャッジ日時 2023-10-17 06:26:19
合計ジャッジ時間 2,766 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,100 KB
testcase_01 AC 29 ms
10,100 KB
testcase_02 AC 28 ms
10,100 KB
testcase_03 AC 28 ms
10,100 KB
testcase_04 AC 395 ms
10,656 KB
testcase_05 AC 39 ms
10,148 KB
testcase_06 AC 43 ms
10,164 KB
testcase_07 AC 251 ms
10,552 KB
testcase_08 AC 36 ms
10,152 KB
testcase_09 AC 29 ms
10,108 KB
testcase_10 AC 31 ms
10,108 KB
testcase_11 AC 31 ms
10,108 KB
testcase_12 AC 29 ms
10,108 KB
testcase_13 AC 29 ms
10,104 KB
testcase_14 AC 29 ms
10,108 KB
testcase_15 AC 30 ms
10,108 KB
testcase_16 AC 31 ms
10,108 KB
testcase_17 AC 119 ms
10,336 KB
testcase_18 AC 31 ms
10,108 KB
testcase_19 AC 108 ms
10,316 KB
testcase_20 AC 30 ms
10,108 KB
testcase_21 AC 29 ms
10,104 KB
testcase_22 AC 30 ms
10,108 KB
testcase_23 AC 31 ms
10,108 KB
testcase_24 AC 213 ms
10,476 KB
testcase_25 AC 31 ms
10,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	head = ""
	tail = ""
	for i in range(N):
		t, s = list(input().split())
		if t == "0":
			tail += s
		else:
			head += s

	ans = head[::-1] + tail
	print(ans)

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