結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 22:27:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 431 bytes |
| コンパイル時間 | 819 ms |
| コンパイル使用メモリ | 81,600 KB |
| 実行使用メモリ | 53,148 KB |
| 最終ジャッジ日時 | 2025-04-15 22:29:40 |
| 合計ジャッジ時間 | 2,367 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 7 |
ソースコード
X = int(input())
Y = int(input())
L = int(input())
Dx = abs(X)
Dy = abs(Y)
x_steps = (Dx + L - 1) // L if Dx != 0 else 0
y_steps = (Dy + L - 1) // L if Dy != 0 else 0
directions = 0
if x_steps > 0:
directions += 1
if y_steps > 0:
directions += 1
if directions == 0:
print(0)
elif directions == 1:
if y_steps > 0:
print(y_steps)
else:
print(1 + x_steps)
else:
print(y_steps + x_steps + 1)
lam6er