結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2023-09-17 08:14:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 257 bytes |
コンパイル時間 | 192 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-04 04:57:57 |
合計ジャッジ時間 | 1,670 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
import math dir_x = int(input()) dir_y = int(input()) dis = int(input()) ans = math.ceil(abs(dir_x) / dis) ans += math.ceil(abs(dir_y) / dis) if dir_y < 0: ans += 2 if dir_x != 0 and dir_y > 0: ans += 1 if dir_y == 0: ans += 0 print(ans)