結果

問題 No.48 ロボットの操縦
ユーザー RK Python
提出日時 2020-05-31 15:37:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 353 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-17 14:53:46
合計ジャッジ時間 1,727 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil
X = int(input())
Y = int(input())
L = int(input())
if Y >= 0:
    if X!=0 and Y!=0:
        print(abs(ceil(X/L)) + abs(ceil(Y/L)) + 1)
    else:
        print(abs(ceil(X/L)) + abs(ceil(Y/L)))
else:
    if X!=0 and Y!=0:
        print(abs(ceil(X/L)) + abs(ceil(Y/L)) + 3)
    else:
        print(abs(ceil(X/L)) + abs(ceil(Y/L)) + 2)
0