結果
| 問題 | 
                            No.48 ロボットの操縦
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-04-01 21:18:05 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 717 bytes | 
| コンパイル時間 | 93 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 10,624 KB | 
| 最終ジャッジ日時 | 2024-11-26 10:37:26 | 
| 合計ジャッジ時間 | 1,537 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 23 WA * 2 | 
ソースコード
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) +1 +math.ceil(distination_x/distance) +1
elif distination_y < 0 and distination_x < 0:
    turn = math.ceil(-1*distination_y/distance) +1 +math.ceil(-1*distination_x/distance) +1
if distination_y == 0:
    turn = turn-1
print(turn)