結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-12 23:17:32 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 225 bytes |
| コンパイル時間 | 378 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-07-21 11:59:43 |
| 合計ジャッジ時間 | 3,723 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 12 |
コンパイルメッセージ
Syntax OK
ソースコード
x = gets.chomp!.to_i.abs y = gets.chomp!.to_i l = gets.chomp!.to_i inst = ((x + y.abs) / l) inst += 1 if (x + y.abs) % l > 0 inst += 1 if x != 0 && y >= 0 inst += 2 if x == 0 && y < 0 inst += 2 if x != 0 && y < 0 puts inst