結果

問題 No.1026 OGAWA's New Keyboard
ユーザー 山根直也山根直也
提出日時 2020-06-28 15:08:55
言語 Ruby
(3.3.0)
結果
AC  
実行時間 525 ms / 1,000 ms
コード長 204 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 50,844 KB
最終ジャッジ日時 2023-09-22 00:37:32
合計ジャッジ時間 6,557 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,144 KB
testcase_01 AC 82 ms
15,116 KB
testcase_02 AC 85 ms
15,148 KB
testcase_03 AC 84 ms
15,088 KB
testcase_04 AC 525 ms
50,844 KB
testcase_05 AC 95 ms
15,836 KB
testcase_06 AC 100 ms
16,064 KB
testcase_07 AC 345 ms
35,780 KB
testcase_08 AC 89 ms
15,576 KB
testcase_09 AC 84 ms
15,084 KB
testcase_10 AC 87 ms
15,084 KB
testcase_11 AC 87 ms
15,144 KB
testcase_12 AC 85 ms
15,120 KB
testcase_13 AC 83 ms
15,160 KB
testcase_14 AC 85 ms
15,152 KB
testcase_15 AC 86 ms
15,136 KB
testcase_16 AC 87 ms
15,116 KB
testcase_17 AC 183 ms
24,088 KB
testcase_18 AC 87 ms
15,172 KB
testcase_19 AC 176 ms
23,736 KB
testcase_20 AC 85 ms
15,168 KB
testcase_21 AC 84 ms
15,284 KB
testcase_22 AC 86 ms
15,088 KB
testcase_23 AC 86 ms
15,340 KB
testcase_24 AC 292 ms
34,024 KB
testcase_25 AC 88 ms
15,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.chomp.to_i 
ary=[]
n.times do
    ary.push(gets.chomp.split(" "))
end
word=[]
ary.each do |a|
    if a[0]=="0"
        word.push(a[1])
    else
        word.unshift(a[1])
    end
end
puts word.join
0