結果

問題 No.48 ロボットの操縦
ユーザー takaaaa6takaaaa6
提出日時 2022-03-07 17:03:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 7,992 KB
最終ジャッジ日時 2023-09-29 18:07:05
合計ジャッジ時間 1,646 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,816 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 15 ms
7,896 KB
testcase_04 WA -
testcase_05 AC 15 ms
7,880 KB
testcase_06 WA -
testcase_07 AC 15 ms
7,792 KB
testcase_08 WA -
testcase_09 AC 14 ms
7,796 KB
testcase_10 AC 14 ms
7,888 KB
testcase_11 AC 14 ms
7,920 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 14 ms
7,848 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 14 ms
7,820 KB
testcase_19 AC 14 ms
7,976 KB
testcase_20 AC 14 ms
7,976 KB
testcase_21 AC 14 ms
7,736 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if (X+Y)%L == 0:
    if X==0 or Y==0:
        print(int((abs(X)+abs(Y))/L))

    elif X < 0:
        print(int((abs(X)+abs(Y))/L)+2)

    else:
        print(int((abs(X)+abs(Y))/L)+1)

else:
    if X==0 or Y==0:
        print(int((abs(X)+abs(Y))/L)+1)

    elif X < 0:
        print(int((abs(X)+abs(Y))/L)+3)

    else:
        print(int((abs(X)+abs(Y))/L)+2)
0