結果

問題 No.48 ロボットの操縦
ユーザー akitsugu777
提出日時 2019-06-25 10:27:42
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 308 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-22 23:36:40
合計ジャッジ時間 1,663 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 = a + b
    else:
        c = a + b + 1

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

else:
    c = a + b + 2

print(c)
0