結果
問題 | No.2352 Sharpened Knife in Fall |
ユーザー |
![]() |
提出日時 | 2023-06-16 21:42:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 368 ms / 3,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,012 KB |
実行使用メモリ | 84,908 KB |
最終ジャッジ日時 | 2024-06-24 13:31:26 |
合計ジャッジ時間 | 11,406 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
from math import * def calc(S): yes = 1 no = -1 for _ in range(60): mid = (yes + no)/2 alpha = asin(mid) s = pi/2 - alpha - sin(2 * alpha)/2 if s <= S: yes = mid else: no = mid return yes R, K = map(int, input().split()) P = [] for i in range(K//2): P.append(calc(pi/(K + 1) * (i + 1))) ans = [] if K % 2: ans.append(0) for p in P: ans.append(p * R) ans.append(-p * R) ans.sort() for a in ans: print(a)