結果

問題 No.48 ロボットの操縦
ユーザー 双六双六
提出日時 2020-07-22 10:18:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 5,000 ms
コード長 480 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 72,892 KB
最終ジャッジ日時 2023-09-01 21:48:23
合計ジャッジ時間 4,339 ms
ジャッジサーバーID
(参考情報)
judge13 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 105 ms
72,484 KB
testcase_01 AC 104 ms
72,632 KB
testcase_02 AC 106 ms
72,636 KB
testcase_03 AC 106 ms
72,604 KB
testcase_04 AC 106 ms
72,648 KB
testcase_05 AC 106 ms
72,652 KB
testcase_06 AC 106 ms
72,512 KB
testcase_07 AC 105 ms
72,812 KB
testcase_08 AC 105 ms
72,648 KB
testcase_09 AC 105 ms
72,608 KB
testcase_10 AC 105 ms
72,412 KB
testcase_11 AC 106 ms
72,892 KB
testcase_12 AC 105 ms
72,840 KB
testcase_13 AC 103 ms
72,708 KB
testcase_14 AC 104 ms
72,636 KB
testcase_15 AC 104 ms
72,652 KB
testcase_16 AC 106 ms
72,632 KB
testcase_17 AC 106 ms
72,448 KB
testcase_18 AC 105 ms
72,672 KB
testcase_19 AC 106 ms
72,744 KB
testcase_20 AC 108 ms
72,800 KB
testcase_21 AC 108 ms
72,840 KB
testcase_22 AC 109 ms
72,632 KB
testcase_23 AC 109 ms
72,712 KB
testcase_24 AC 105 ms
72,552 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import sys; input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")
import copy

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	X = int(input())
	Y = int(input())
	L = int(input())
	state = 0
	if X != 0:
		state = 1
	if Y < 0:
		state = 2

	ans = state + int((abs(X) - 1) // L + 1) + int((abs(Y) - 1) // L + 1)
	print(ans)


if __name__ == '__main__':
	main()
0