結果

問題 No.48 ロボットの操縦
ユーザー akitsugu777
提出日時 2018-12-11 16:45:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 296 bytes
コンパイル時間 440 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-22 03:28:13
合計ジャッジ時間 1,743 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

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

a =  math.ceil(abs(x) / l)
b =  math.ceil(abs(y) / l)

if y == 0:
    if x == 0:
        c = 0
    else:
        c = a + 1

elif y > 0:
    if x == 0:
        c = b
    else:
        c = a + b + 1

else:
    c = a + b + 2

print(c)
0