結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-04-01 21:06:13 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 714 bytes | 
| コンパイル時間 | 1,300 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-11-26 09:54:09 | 
| 合計ジャッジ時間 | 2,101 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 WA * 6 | 
ソースコード
import math
distination_x = float(input())
distination_y = float(input())
distance = float(input())
turn = int(0)
if distination_y >= 0 and distination_x >= 0:
    turn = math.ceil(distination_y / distance) + math.ceil(distination_x/distance) + 1
elif distination_y >= 0 and distination_x < 0:
    turn = math.ceil(distination_y/distance) + math.ceil(-1*distination_x/distance) + 1
elif distination_y < 0 and distination_x >= 0:
    turn = math.ceil(-1*distination_y/distance) +2 +math.ceil(distination_x/distance) +1
elif distination_y < 0 and distination_x < 0:
    turn = math.ceil(-1*distination_y/distance) +2 +math.ceil(distination_x/distance) +1
if distination_x == 0:
    turn = turn-1
print(turn)