結果

問題 No.48 ロボットの操縦
ユーザー zombietan
提出日時 2016-04-26 23:19:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 273 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-04 15:57:46
合計ジャッジ時間 2,198 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 24 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

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

a, b = 0, 0


x = math.ceil(abs(X)/L)
y = math.ceil(abs(Y)/L)

if X != 0 and Y > 0:
    r = 1
elif X != 0 and Y < 0:
    r = 2
elif X == 0 and Y >= 0:
    r = 0
elif X != 0 and Y == 0:
    r = 1

print(x+y+r)
0