結果

問題 No.48 ロボットの操縦
ユーザー HIROPON87069639HIROPON87069639
提出日時 2016-02-15 00:23:06
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 416 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 7,092 KB
実行使用メモリ 6,560 KB
最終ジャッジ日時 2023-10-22 05:25:56
合計ジャッジ時間 1,283 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,444 KB
testcase_01 AC 11 ms
6,444 KB
testcase_02 WA -
testcase_03 AC 11 ms
6,444 KB
testcase_04 AC 11 ms
6,444 KB
testcase_05 AC 11 ms
6,444 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 11 ms
6,444 KB
testcase_13 WA -
testcase_14 AC 12 ms
6,444 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

X = input()
Y = input()
L = input()
Xt = abs(math.ceil(float(X)/float(L)))
Yt = abs(math.ceil(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