結果

問題 No.48 ロボットの操縦
ユーザー pypypymipypypymi
提出日時 2022-02-17 18:15:55
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 253 bytes
コンパイル時間 914 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-09-11 17:47:08
合計ジャッジ時間 3,332 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,180 KB
testcase_01 AC 73 ms
71,264 KB
testcase_02 AC 73 ms
71,416 KB
testcase_03 WA -
testcase_04 AC 74 ms
71,280 KB
testcase_05 AC 74 ms
71,352 KB
testcase_06 AC 74 ms
71,308 KB
testcase_07 AC 75 ms
71,084 KB
testcase_08 WA -
testcase_09 AC 73 ms
70,924 KB
testcase_10 WA -
testcase_11 AC 73 ms
71,300 KB
testcase_12 AC 73 ms
71,220 KB
testcase_13 AC 73 ms
71,232 KB
testcase_14 AC 71 ms
71,220 KB
testcase_15 AC 74 ms
71,132 KB
testcase_16 AC 74 ms
71,348 KB
testcase_17 AC 73 ms
71,312 KB
testcase_18 WA -
testcase_19 AC 73 ms
71,452 KB
testcase_20 AC 72 ms
71,460 KB
testcase_21 AC 72 ms
71,176 KB
testcase_22 WA -
testcase_23 AC 73 ms
71,080 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

x = int(input())
y = int(input())
l = int(input())

import math
count = 0
if y>=0:
    count = math.ceil(abs(y)/l)
else:
    count = math.ceil(abs(y)/l)+2

if x==0:
    print(count)
else:
    count+=math.ceil(abs(x)/l)
    count+=1
    print(count)
    
0