結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2016-06-06 13:11:08 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 97 ms / 5,000 ms |
| コード長 | 184 bytes |
| 記録 | |
| コンパイル時間 | 51 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-10-08 16:33:44 |
| 合計ジャッジ時間 | 2,838 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
Main.rb:10: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:16: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:2: warning: assigned but unused variable - xa Main.rb:3: warning: assigned but unused variable - xb Main.rb:4: warning: assigned but unused variable - sc Syntax OK
ソースコード
sa,pa,xa=STDIN.gets.split(" ")
sb,pb,xb=STDIN.gets.split(" ")
sc=[sa,sb]
pa=pa.to_i
pb=pb.to_i
if pa==0 && pb==0
puts -1
elsif pa>pb
puts sa
elsif pa<pb
puts sb
else
puts -1
end
horiesiniti