結果

問題 No.201 yukicoderじゃんけん
ユーザー wonda_t_coffee
提出日時 2020-02-01 09:55:13
言語 Ruby
(3.4.1)
結果
AC  
実行時間 94 ms / 5,000 ms
コード長 151 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,288 KB
最終ジャッジ日時 2024-09-18 19:46:03
合計ジャッジ時間 3,313 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:12: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Main.rb:1: warning: assigned but unused variable - xb
Syntax OK

ソースコード

diff #

sa, pa, xb = gets.chomp.split
sb, pb, xb = gets.chomp.split

pa = pa.to_i
pb = pb.to_i

if pa > pb
  puts sa
elsif pa < pb
  puts sb
else
  puts -1
end
0