結果
問題 |
No.48 ロボットの操縦
|
ユーザー |
|
提出日時 | 2019-04-01 21:12:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 717 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-26 10:20:46 |
合計ジャッジ時間 | 1,818 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 WA * 1 |
ソースコード
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_x == 0: turn = turn-1 print(turn)