結果

問題 No.48 ロボットの操縦
ユーザー RinTabataRinTabata
提出日時 2024-02-13 13:37:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 275 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-09-28 18:21:11
合計ジャッジ時間 1,483 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
ans = 0
X = int(input())
Y = int(input())
L = int(input())
if Y >= 0 and X == 0:
    ans += math.ceil(Y/L)
elif Y >= 0 and X != 0:
    ans += math.ceil(Y/L) + math.ceil(abs(X)/L) + 1
elif Y < 0:
    ans += math.ceil(abs(Y)/L) + math.ceil(abs(X)/L) + 2

print(ans)
0