結果

問題 No.48 ロボットの操縦
ユーザー HIROPON87069639
提出日時 2016-02-15 00:26:41
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 417 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 06:43:51
合計ジャッジ時間 1,121 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import math

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