結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-05-07 22:50:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 414 bytes |
| コンパイル時間 | 498 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2025-05-07 22:50:56 |
| 合計ジャッジ時間 | 2,338 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
import math X= int(input()) Y= int(input()) L= int(input()) def step(X, Y, L): count= 0 if X != 0: count += 1 count += math.ceil(abs(X)/L) if Y < 0: count += 1 count += math.ceil(abs(Y)/L) elif Y > 0: count += math.ceil(abs(Y)/L) elif X == 0: if Y < 0: count += 2 count += math.ceil(abs(Y)/L) elif Y > 0: count += math.ceil(abs(Y)/L) return print (count) step(X, Y, L)