結果

問題 No.201 yukicoderじゃんけん
ユーザー fine
提出日時 2015-10-11 20:53:50
言語 Ruby
(3.4.1)
結果
AC  
実行時間 92 ms / 5,000 ms
コード長 150 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,160 KB
最終ジャッジ日時 2024-07-21 06:52:41
合計ジャッジ時間 2,899 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
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