結果

問題 No.48 ロボットの操縦
ユーザー kohei2019
提出日時 2021-03-16 12:31:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 577 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 51,968 KB
最終ジャッジ日時 2024-11-07 22:56:51
合計ジャッジ時間 2,395 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

X = int(input())
Y = int(input())
L = int(input())

cnt = 0
if Y < 0:
    cnt += 2
    cnt += -(-abs(Y)//L)
    if X != 0:
        cnt += -(-abs(X)//L)
elif Y > 0:
    cnt += -(-Y//L)
    if X != 0:
        cnt += 1
        cnt += -(-abs(X)//L)
else:
    if X != 0:
        cnt += 1
        cnt += -(-abs(X)//L)
print(cnt)
0