結果
| 問題 | No.48 ロボットの操縦 |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2026-01-02 17:57:27 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 334 bytes |
| 記録 | |
| コンパイル時間 | 399 ms |
| コンパイル使用メモリ | 82,044 KB |
| 実行使用メモリ | 53,908 KB |
| 最終ジャッジ日時 | 2026-01-02 17:57:30 |
| 合計ジャッジ時間 | 2,726 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 6 |
ソースコード
def ceildiv(a: int, b: int) -> int:
return (a + b - 1) // b
X = int(input())
Y = int(input())
L = int(input())
def y_cost():
if Y >= 0:
return ceildiv(Y, L)
return ceildiv(abs(Y), L) + 2
def x_cost():
if X == 0:
return 0
return ceildiv(abs(X), L) + 1
ans = x_cost() + y_cost()
print(ans)
norioc