結果

問題 No.201 yukicoderじゃんけん
ユーザー zazaboonzazaboon
提出日時 2017-02-11 20:47:54
言語 Ruby
(3.3.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 155 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 11,560 KB
実行使用メモリ 15,656 KB
最終ジャッジ日時 2023-08-28 14:45:49
合計ジャッジ時間 2,826 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,248 KB
testcase_01 AC 79 ms
15,224 KB
testcase_02 AC 77 ms
15,012 KB
testcase_03 AC 77 ms
15,348 KB
testcase_04 AC 78 ms
15,312 KB
testcase_05 AC 77 ms
15,292 KB
testcase_06 AC 77 ms
15,460 KB
testcase_07 AC 76 ms
15,280 KB
testcase_08 AC 77 ms
15,348 KB
testcase_09 AC 76 ms
15,220 KB
testcase_10 AC 76 ms
15,312 KB
testcase_11 AC 77 ms
15,272 KB
testcase_12 AC 77 ms
15,224 KB
testcase_13 AC 78 ms
15,220 KB
testcase_14 AC 77 ms
15,220 KB
testcase_15 AC 79 ms
15,372 KB
testcase_16 AC 79 ms
15,636 KB
testcase_17 AC 77 ms
15,460 KB
testcase_18 AC 77 ms
15,656 KB
testcase_19 AC 76 ms
15,456 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

a = gets.chomp.split(" ")
b = gets.chomp.split(" ")
a[1] = a[1].to_i
b[1] = b[1].to_i
if(a[1] == b[1])
  puts -1
else
  puts (a[1] > b[1])? a[0] : b[0]
end
0