結果

問題 No.26 シャッフルゲーム
ユーザー maimai
提出日時 2016-01-29 11:06:52
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 129 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 11,264 KB
実行使用メモリ 15,320 KB
最終ジャッジ日時 2023-08-27 01:30:39
合計ジャッジ時間 1,602 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,292 KB
testcase_01 AC 78 ms
15,120 KB
testcase_02 AC 78 ms
15,128 KB
testcase_03 AC 77 ms
15,320 KB
testcase_04 AC 76 ms
15,232 KB
testcase_05 AC 74 ms
15,120 KB
testcase_06 AC 82 ms
15,044 KB
testcase_07 AC 76 ms
15,248 KB
testcase_08 AC 79 ms
15,120 KB
testcase_09 AC 80 ms
15,124 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n,m=gets.to_i,gets.to_i
while cin=gets
    cl=cin.split(" ").map(&:to_i)
    n= n==cl[1] ? cl[0] : (n==cl[0] ? cl[1] : n)
end
p n
0