結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
tyntyn
|
| 提出日時 | 2019-09-15 23:12:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 447 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-06 22:52:34 |
| 合計ジャッジ時間 | 1,563 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 25 |
ソースコード
x = int(inport())
y = int(inport())
l = int(inport())
abs_x = abs(x)
abs_y = abs(y)
if abs_x % l == 0:
n_x = abs_x // l
else:
n_x = abs_x // l + 1
if abs_y % l == 0:
n_y = abs_y // l
else:
n_y = abs_y // l + 1
if y < 0:
ans = n_x + n_y + 2
elif y > 0:
if x == 0:
ans = n_x + n_y
else:
ans = n_x + n_y + 1
else:
if x == 0:
ans = n_x + n_y
else:
ans = n_x + n_y + 1
print(ans)
tyntyn