結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-19 12:41:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 422 bytes |
| 記録 | |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 17,824 KB |
| 最終ジャッジ日時 | 2024-07-16 02:09:44 |
| 合計ジャッジ時間 | 6,754 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 TLE * 1 -- * 23 |
ソースコード
import math
x = int(input())
y = int(input())
moving = int(input())
count = 0
# where quadrant?
if x == 0:
count = 0
elif y >= 0:
count = count + 1
else:
count = count + 2
x, y = abs(x), abs(y)
while x > 0:
sep_x = math.floor(x / moving)
count = count + sep_x
x = x - sep_x * moving
while y > 0:
sep_y = math.floor(y / moving)
count = count + sep_y
y = y - sep_y * moving
print(count)