結果
| 問題 | 
                            No.1129 Rating じゃんけん
                             | 
                    
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-06-24 20:56:13 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 101 ms / 2,000 ms | 
| コード長 | 443 bytes | 
| コンパイル時間 | 114 ms | 
| コンパイル使用メモリ | 7,424 KB | 
| 実行使用メモリ | 12,416 KB | 
| 最終ジャッジ日時 | 2024-06-25 07:33:03 | 
| 合計ジャッジ時間 | 2,691 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 16 | 
コンパイルメッセージ
Syntax OK
ソースコード
null_rate, null_hand, tRue_rate, tRue_hand = gets.split.map(&:to_i)
def winner(n_hand, t_hand)
  return 'Draw' if n_hand == t_hand
  return 'null' if n_hand == 0 && t_hand == 1 || n_hand == 1 && t_hand == 2 || n_hand == 2 && t_hand == 0
  'tRue'
end
if null_rate == tRue_rate
  puts winner(null_hand, tRue_hand)
else
  if null_rate == tRue_rate
    puts 'Draw'
  elsif null_rate > tRue_rate
    puts 'null'
  else
    puts 'tRue'
  end
end