結果
問題 |
No.172 UFOを捕まえろ
|
ユーザー |
![]() |
提出日時 | 2021-10-18 22:07:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 29 ms / 5,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 134 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-19 18:39:47 |
合計ジャッジ時間 | 1,493 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import math def pos(x, y, r, degree): rad = math.radians(degree) return (r * math.cos(rad) + x, r * math.sin(rad) + y) def main(): x, y, r = map(int, input().split()) # first quadrant x, y = pos(abs(x), abs(y), r, 45) manhattan = 0 for r in range(1, 500): if y < -x + r: manhattan = r break print(manhattan) if __name__ == "__main__": main()