結果

問題 No.48 ロボットの操縦
ユーザー mlihua09mlihua09
提出日時 2020-08-23 01:27:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 71,372 KB
最終ジャッジ日時 2023-08-05 15:25:16
合計ジャッジ時間 3,198 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,176 KB
testcase_01 AC 67 ms
71,176 KB
testcase_02 AC 67 ms
71,300 KB
testcase_03 AC 71 ms
70,868 KB
testcase_04 AC 70 ms
71,356 KB
testcase_05 AC 69 ms
71,020 KB
testcase_06 AC 66 ms
71,256 KB
testcase_07 AC 68 ms
70,872 KB
testcase_08 AC 69 ms
71,264 KB
testcase_09 AC 70 ms
71,224 KB
testcase_10 AC 70 ms
71,332 KB
testcase_11 AC 68 ms
71,108 KB
testcase_12 AC 69 ms
71,372 KB
testcase_13 AC 67 ms
71,252 KB
testcase_14 AC 68 ms
71,236 KB
testcase_15 AC 68 ms
71,308 KB
testcase_16 AC 68 ms
71,236 KB
testcase_17 AC 67 ms
71,304 KB
testcase_18 AC 70 ms
71,084 KB
testcase_19 AC 69 ms
71,280 KB
testcase_20 AC 70 ms
71,240 KB
testcase_21 AC 70 ms
71,088 KB
testcase_22 AC 68 ms
71,084 KB
testcase_23 AC 68 ms
71,212 KB
testcase_24 AC 67 ms
71,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import math



X = int(input())

Y = int(input())

L = int(input())

ans = math.ceil(abs(X) / L) + math.ceil(abs(Y) / L)

if Y < 0:
    
    print(ans + 2)
    
else:
    if X == 0:
        
        print(ans)
        
    else:
        
        print(ans + 1)
0