結果
| 問題 | No.2352 Sharpened Knife in Fall |
| コンテスト | |
| ユーザー |
chankei271828
|
| 提出日時 | 2023-06-16 21:44:19 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 434 ms / 3,000 ms |
| + 392µs | |
| コード長 | 519 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 84,992 KB |
| 最終ジャッジ日時 | 2026-07-29 03:44:07 |
| 合計ジャッジ時間 | 11,487 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
chankei271828