結果
| 問題 |
No.48 ロボットの操縦
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-15 22:46:41 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 5,000 ms |
| コード長 | 443 bytes |
| コンパイル時間 | 41 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2024-11-21 18:46:47 |
| 合計ジャッジ時間 | 1,067 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#!/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)