結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-17 08:22:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 5,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 132 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-04 05:03:33 |
| 合計ジャッジ時間 | 1,810 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
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 and dir_x == 0:
pass
if dir_y >= 0 and dir_x != 0:
ans += 1
if dir_y < 0:
ans += 2
print(ans)