結果
問題 | No.1129 Rating じゃんけん |
ユーザー | Takuya Noguchi |
提出日時 | 2021-06-24 20:56:13 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 83 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 559 ms |
コンパイル使用メモリ | 11,396 KB |
実行使用メモリ | 15,336 KB |
最終ジャッジ日時 | 2023-09-07 13:26:42 |
合計ジャッジ時間 | 2,983 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
15,028 KB |
testcase_01 | AC | 79 ms
15,232 KB |
testcase_02 | AC | 75 ms
15,064 KB |
testcase_03 | AC | 78 ms
15,336 KB |
testcase_04 | AC | 78 ms
15,232 KB |
testcase_05 | AC | 76 ms
15,316 KB |
testcase_06 | AC | 77 ms
15,132 KB |
testcase_07 | AC | 77 ms
15,132 KB |
testcase_08 | AC | 77 ms
15,280 KB |
testcase_09 | AC | 76 ms
15,068 KB |
testcase_10 | AC | 79 ms
15,120 KB |
testcase_11 | AC | 78 ms
15,324 KB |
testcase_12 | AC | 79 ms
15,176 KB |
testcase_13 | AC | 78 ms
15,284 KB |
testcase_14 | AC | 83 ms
15,236 KB |
testcase_15 | AC | 78 ms
15,116 KB |
testcase_16 | AC | 77 ms
15,096 KB |
testcase_17 | AC | 76 ms
15,184 KB |
コンパイルメッセージ
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