結果

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

ソースコード

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 and Y<0:
        C =2
    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