結果

問題 No.48 ロボットの操縦
ユーザー kotatsukotatsu
提出日時 2023-08-18 13:32:43
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 114 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-11-27 18:54:25
合計ジャッジ時間 1,482 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 21 RE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

X = int(input())
Y = int(input())
L = int(input())

if X != 0:
    A = (abs(X)//L) + (abs(X)%L)
else:
    A = 0

if Y != 0:
    B = (abs(Y)//L) + (abs(Y)%L)
else:
    B = 0

if X == 0 or Y ==0:
    if X == 0 and Y != 0:
        C = 0
        if X !=0 or Y == 0:
            C =1
elif X*Y<0:
    if Y<0:
        C =2
    else:
        C =1
else:
    C = 1

print(A+B+C)
0