結果

問題 No.48 ロボットの操縦
コンテスト
ユーザー Hagian
提出日時 2021-06-01 03:12:45
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 22 ms / 5,000 ms
+ 250µs
コード長 277 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 56 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2026-09-21 15:04:12
合計ジャッジ時間 2,031 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from math import ceil
X = int(input())
Y = int(input())
L = int(input())

count = 0

if Y >= 0 and X == 0:
    count = ceil(Y / L)
elif Y >= 0 and abs(X) > 0:
    count = ceil(Y / L) + 1 + ceil(abs(X) / L)
else:
    count = ceil(abs(X) / L) + ceil(abs(Y) / L) + 2

print(count)
0