結果

問題 No.48 ロボットの操縦
ユーザー 👑 KazunKazun
提出日時 2020-05-31 14:53:22
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 70 ms / 5,000 ms
コード長 282 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,176 KB
実行使用メモリ 71,732 KB
最終ジャッジ日時 2023-08-11 01:18:51
合計ジャッジ時間 3,096 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,468 KB
testcase_01 AC 67 ms
71,432 KB
testcase_02 AC 68 ms
71,320 KB
testcase_03 AC 67 ms
71,348 KB
testcase_04 AC 68 ms
71,324 KB
testcase_05 AC 68 ms
71,324 KB
testcase_06 AC 69 ms
71,384 KB
testcase_07 AC 68 ms
71,400 KB
testcase_08 AC 68 ms
71,440 KB
testcase_09 AC 69 ms
71,320 KB
testcase_10 AC 70 ms
71,700 KB
testcase_11 AC 68 ms
71,512 KB
testcase_12 AC 68 ms
71,208 KB
testcase_13 AC 69 ms
71,652 KB
testcase_14 AC 69 ms
71,276 KB
testcase_15 AC 69 ms
71,624 KB
testcase_16 AC 68 ms
71,184 KB
testcase_17 AC 69 ms
71,284 KB
testcase_18 AC 68 ms
71,152 KB
testcase_19 AC 68 ms
71,704 KB
testcase_20 AC 69 ms
71,284 KB
testcase_21 AC 67 ms
71,588 KB
testcase_22 AC 66 ms
71,732 KB
testcase_23 AC 68 ms
71,388 KB
testcase_24 AC 68 ms
71,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import ceil

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

if X==Y==0:
    print(0)
elif (X==0 and Y>0):
    print(ceil(Y/L))
elif (X==0 and Y<0):
    print(ceil(abs(Y)/L)+2)
elif Y>=0:
    print(ceil(Y/L)+ceil(abs(X/L))+1)
else:
    print(ceil(abs(Y)/L)+ceil(abs(X/L))+2)
0