結果
| 問題 | 
                            No.1026 OGAWA's New Keyboard
                             | 
                    
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-07-29 13:09:57 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 171 ms / 1,000 ms | 
| コード長 | 183 bytes | 
| コンパイル時間 | 227 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 93,312 KB | 
| 最終ジャッジ日時 | 2024-10-07 20:10:56 | 
| 合計ジャッジ時間 | 2,929 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 21 | 
ソースコード
n = int(input())
S = []
T = []
for _ in range(n):
    s, t = input().split()
    if s == "0":
        T.append(t)
    else:
        S.append(t)
ans = S[::-1] + T
print(*ans, sep="")