結果

問題 No.1026 OGAWA's New Keyboard
ユーザー liny_tail
提出日時 2024-08-16 15:06:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 134 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 13,952 KB
最終ジャッジ日時 2024-08-16 15:06:33
合計ジャッジ時間 2,194 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

#N = int(input())
N = int(sys.stdin.readline())
lst1 = []
lst2 = []
ans = ''
for i in range(N):
  #T,S = input().split(' ')
  T,S = sys.stdin.readline().strip().split(' ')
  if T == '0':
    #ans += S
    lst1.append(S)
  else:
    #ans = S + ans
    lst2.append(S)
#print(ans)
print(''.join(lst2[::-1]) + ''.join(lst1))
0