結果

問題 No.48 ロボットの操縦
ユーザー Co-3
提出日時 2020-12-11 23:13:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 314 bytes
コンパイル時間 348 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-19 21:36:24
合計ジャッジ時間 1,705 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
y = int(input())
l = int(input())
if y > 0:
    if x == 0:
        print(int((y+l-1)//l))
    else:
        print(int((y+l-1)//l+(abs(x)+2*l-1)//l))
elif y == 0:
    if x == 0:
        print(0)
    else:
        print(int((abs(x)+2*l-1)//l))
else:
    print(int((abs(y)+3*l-1)//l+(abs(x)+l-1)//l))
0