結果

問題 No.2352 Sharpened Knife in Fall
ユーザー chankei271828chankei271828
提出日時 2023-06-16 21:44:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 679 ms / 3,000 ms
コード長 519 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 86,796 KB
実行使用メモリ 78,028 KB
最終ジャッジ日時 2023-09-06 19:09:38
合計ジャッジ時間 16,105 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,252 KB
testcase_01 AC 70 ms
71,572 KB
testcase_02 AC 70 ms
71,544 KB
testcase_03 AC 70 ms
71,196 KB
testcase_04 AC 666 ms
78,028 KB
testcase_05 AC 71 ms
71,616 KB
testcase_06 AC 679 ms
78,020 KB
testcase_07 AC 368 ms
77,816 KB
testcase_08 AC 627 ms
77,984 KB
testcase_09 AC 640 ms
77,980 KB
testcase_10 AC 650 ms
77,940 KB
testcase_11 AC 646 ms
77,876 KB
testcase_12 AC 648 ms
77,868 KB
testcase_13 AC 655 ms
77,908 KB
testcase_14 AC 356 ms
77,376 KB
testcase_15 AC 677 ms
77,564 KB
testcase_16 AC 127 ms
77,692 KB
testcase_17 AC 109 ms
77,556 KB
testcase_18 AC 318 ms
77,584 KB
testcase_19 AC 522 ms
77,632 KB
testcase_20 AC 271 ms
77,696 KB
testcase_21 AC 266 ms
77,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0