結果

問題 No.48 ロボットの操縦
ユーザー brthyyjpbrthyyjp
提出日時 2021-06-23 22:24:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 217 bytes
コンパイル時間 1,605 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 71,556 KB
最終ジャッジ日時 2023-09-07 04:11:38
合計ジャッジ時間 3,822 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,240 KB
testcase_01 AC 71 ms
71,100 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 71 ms
71,448 KB
testcase_05 AC 71 ms
71,376 KB
testcase_06 AC 71 ms
71,556 KB
testcase_07 AC 71 ms
71,228 KB
testcase_08 WA -
testcase_09 AC 70 ms
71,236 KB
testcase_10 WA -
testcase_11 AC 70 ms
71,432 KB
testcase_12 AC 69 ms
71,176 KB
testcase_13 AC 72 ms
71,196 KB
testcase_14 AC 73 ms
71,028 KB
testcase_15 AC 70 ms
71,212 KB
testcase_16 AC 71 ms
71,388 KB
testcase_17 AC 72 ms
71,192 KB
testcase_18 WA -
testcase_19 AC 73 ms
71,100 KB
testcase_20 AC 72 ms
71,092 KB
testcase_21 AC 71 ms
71,224 KB
testcase_22 WA -
testcase_23 AC 71 ms
71,028 KB
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

x = abs(x)

if y >= 0:
    if x == 0:
        ans = (y+l-1)//l
    else:
        ans = (y+l-1)//l+1+(x+l-1)//l
else:
    ans = 1+(x+l-1)//l+1+(y+l-1)//l

print(ans)
0