結果
問題 | No.2352 Sharpened Knife in Fall |
ユーザー | chankei271828 |
提出日時 | 2023-06-16 21:44:19 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 657 ms / 3,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 311 ms |
コンパイル使用メモリ | 81,896 KB |
実行使用メモリ | 77,356 KB |
最終ジャッジ日時 | 2024-06-24 13:35:18 |
合計ジャッジ時間 | 14,808 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 |
ソースコード
import math R,K=map(int,input().split()) def area(theta): if theta<=math.pi/2: return math.pi*R**2/4+R**2*math.cos(theta)*math.sin(theta)/2+(math.pi/2-theta)*R**2/2 else: return (math.pi-theta)*R**2/2+R**2*math.cos(theta)*math.sin(theta)/2 #print(area(0)) #print(area(math.pi)) for i in range(K): l=0 r=math.pi for _ in range(100): now=(r+l)/2 if area(now)<=math.pi*R**2*(i+1)/(2*(K+1)): r=now else: l=now print(R*math.cos(l))