結果

問題 No.201 yukicoderじゃんけん
ユーザー finefine
提出日時 2015-10-11 20:53:50
言語 Ruby
(3.3.0)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 150 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 11,392 KB
実行使用メモリ 15,660 KB
最終ジャッジ日時 2023-09-28 12:13:53
合計ジャッジ時間 3,061 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
15,164 KB
testcase_01 AC 85 ms
15,256 KB
testcase_02 AC 84 ms
15,292 KB
testcase_03 AC 84 ms
15,320 KB
testcase_04 AC 85 ms
15,268 KB
testcase_05 AC 84 ms
15,340 KB
testcase_06 AC 84 ms
15,412 KB
testcase_07 AC 83 ms
15,080 KB
testcase_08 AC 83 ms
15,364 KB
testcase_09 AC 85 ms
15,404 KB
testcase_10 AC 85 ms
15,332 KB
testcase_11 AC 84 ms
15,200 KB
testcase_12 AC 82 ms
15,312 KB
testcase_13 AC 85 ms
15,336 KB
testcase_14 AC 84 ms
15,184 KB
testcase_15 AC 85 ms
15,596 KB
testcase_16 AC 85 ms
15,528 KB
testcase_17 AC 86 ms
15,660 KB
testcase_18 AC 85 ms
15,604 KB
testcase_19 AC 86 ms
15,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:1: warning: assigned but unused variable - x1
Main.rb:2: warning: assigned but unused variable - x2
Syntax OK

ソースコード

diff #

s1,p1,x1 = gets.chomp.split(" ")
s2,p2,x2 = gets.chomp.split(" ")
p1 = p1.to_i
p2 = p2.to_i
if p1 == p2
puts -1
elsif p1 > p2
puts s1
else
puts s2
end
0