結果

問題 No.48 ロボットの操縦
ユーザー minezumu
提出日時 2018-07-25 10:39:16
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-26 00:20:58
合計ジャッジ時間 1,874 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

X = int(input())
Y = int(input())
L = int(input())
counter = 0
if X % L == 0 :
    counter += abs(X//L)
else :
    counter += abs(X//L)+1
if Y % L == 0 :
    counter += abs(Y//L)
else :
    counter += abs(Y//L)+1
if X == 0 :
    if Y < 0 :
        counter += 2
else :
    if Y > 0 :
        counter += 1
    elif Y == 0 :
        counter += 1
    else :
        counter += 2
print(counter)

0