結果

問題 No.48 ロボットの操縦
ユーザー convexineq
提出日時 2020-12-03 07:11:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 265 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,232 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-09-13 14:49:07
合計ジャッジ時間 1,986 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

x = int(readline())
y = int(readline())
L = int(readline())

ans = (abs(x)+L-1)//L + (abs(y)+L-1)//L

if y >= 0:
    if x != 0: ans += 1
else:
    ans += 2

print(ans)
0