結果
問題 | No.48 ロボットの操縦 |
ユーザー |
![]() |
提出日時 | 2016-08-01 11:22:14 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 89 ms / 5,000 ms |
コード長 | 338 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-21 18:44:44 |
合計ジャッジ時間 | 2,970 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
Syntax OK
ソースコード
inputs = STDIN.readlines.map(&:chomp)x = inputs[0].to_iy = inputs[1].to_il = inputs[2].to_idef operations(x, y, l)c = x.abs / l + (x % l == 0 ? 0 : 1) +y.abs / l + (y % l == 0 ? 0 : 1)c + casewhen x == 0 && y >= 00when y >= 01else2endendputs operations(x, y, l)