結果
問題 | No.2103 ±1s Game |
ユーザー |
![]() |
提出日時 | 2022-10-22 21:09:17 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 484 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-07-01 20:59:07 |
合計ジャッジ時間 | 4,576 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 WA * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
X, Y, K, P = gets.split.map(&:to_i)D = (X + Y) - Kif X <= D / 2r = Y - Kif r.even?if P == 1puts 'Alice'elseputs 'Bob'endelseif P == 1puts 'Bob'elseputs 'Alice'endendelsif Y <= D / 2if Y.even?if P == 1puts 'Alice'elseputs 'Bob'endelseif P == 1puts 'Alice'elseputs 'Bob'endendelseif D.even?puts 'Bob'elseputs 'Alice'endend