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