結果

問題 No.48 ロボットの操縦
ユーザー kohei2019kohei2019
提出日時 2021-03-16 12:31:24
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 322 bytes
コンパイル時間 963 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 71,536 KB
最終ジャッジ日時 2023-08-07 18:02:37
合計ジャッジ時間 4,319 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,280 KB
testcase_01 AC 76 ms
71,320 KB
testcase_02 AC 76 ms
71,480 KB
testcase_03 AC 74 ms
71,304 KB
testcase_04 AC 76 ms
71,280 KB
testcase_05 AC 76 ms
71,248 KB
testcase_06 AC 75 ms
71,220 KB
testcase_07 AC 75 ms
71,388 KB
testcase_08 AC 77 ms
71,380 KB
testcase_09 AC 77 ms
71,240 KB
testcase_10 AC 76 ms
71,424 KB
testcase_11 AC 77 ms
71,424 KB
testcase_12 AC 77 ms
71,284 KB
testcase_13 AC 77 ms
71,156 KB
testcase_14 AC 76 ms
71,188 KB
testcase_15 AC 76 ms
71,152 KB
testcase_16 AC 75 ms
71,420 KB
testcase_17 AC 73 ms
71,156 KB
testcase_18 AC 76 ms
71,284 KB
testcase_19 AC 74 ms
71,156 KB
testcase_20 AC 75 ms
71,476 KB
testcase_21 AC 75 ms
71,336 KB
testcase_22 AC 75 ms
71,304 KB
testcase_23 AC 76 ms
71,536 KB
testcase_24 AC 76 ms
71,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

cnt = 0
if Y < 0:
    cnt += 2
    cnt += -(-abs(Y)//L)
    if X != 0:
        cnt += -(-abs(X)//L)
elif Y > 0:
    cnt += -(-Y//L)
    if X != 0:
        cnt += 1
        cnt += -(-abs(X)//L)
else:
    if X != 0:
        cnt += 1
        cnt += -(-abs(X)//L)
print(cnt)
0