結果

問題 No.48 ロボットの操縦
ユーザー yumenomatayume
提出日時 2020-04-02 08:02:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 194 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-06-28 01:49:51
合計ジャッジ時間 2,102 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import math


x = int(input())
y = int(input())
l = int(input())

if x == 0 and y >= 0:
    cnt = 0
elif y < 0:
    cnt = 2
else:
    cnt = 1

print(math.ceil(abs(x)/l)+math.ceil(abs(y)/l)+cnt)
0