結果

問題 No.48 ロボットの操縦
コンテスト
ユーザー akihito0000
提出日時 2016-08-15 22:46:41
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 443 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 141 ms
コンパイル使用メモリ 76,948 KB
最終ジャッジ日時 2025-12-03 21:13:06
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
X = int(raw_input())
Y = int(raw_input())
L = int(raw_input())
ans = 0

if X != 0:
       	ans += 1 + math.ceil(math.fabs(X) * 1.0 / L)
elif X == 0 and Y < 0:
       	ans += 2 + math.ceil(math.fabs(Y) * 1.0 / L)
       	print int(ans)
       	exit()

if Y > 0:
       	ans += math.ceil(math.fabs(Y) * 1.0 / L)
elif Y < 0:
       	ans += 1 + math.ceil(math.fabs(Y) * 1.0 / L)
print int(ans)
0