結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2021-12-14 01:21:03 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 95 ms / 5,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 319 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-23 01:35:01 |
合計ジャッジ時間 | 3,641 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
Syntax OK
ソースコード
x = gets.chomp!.to_i.absy = gets.chomp!.to_il = gets.chomp!.to_iinst = x / linst += 1 if x % l > 0inst += y.abs / linst += 1 if y.abs % l > 0inst += 1 if x != 0 && y >= 0inst += 2 if x == 0 && y < 0inst += 2 if x != 0 && y < 0puts inst