結果

問題 No.574 正多面体サイコロ
ユーザー convexineqconvexineq
提出日時 2021-02-25 01:27:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 224 ms
コンパイル使用メモリ 81,768 KB
実行使用メモリ 59,968 KB
最終ジャッジ日時 2023-10-25 06:42:51
合計ジャッジ時間 2,124 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,480 KB
testcase_01 AC 35 ms
53,480 KB
testcase_02 AC 36 ms
53,480 KB
testcase_03 AC 36 ms
53,480 KB
testcase_04 AC 36 ms
53,480 KB
testcase_05 AC 36 ms
53,480 KB
testcase_06 AC 35 ms
53,480 KB
testcase_07 AC 35 ms
53,480 KB
testcase_08 AC 36 ms
53,480 KB
testcase_09 AC 45 ms
59,968 KB
testcase_10 AC 36 ms
53,540 KB
testcase_11 AC 35 ms
53,540 KB
testcase_12 AC 36 ms
53,540 KB
testcase_13 AC 36 ms
53,540 KB
testcase_14 AC 36 ms
53,540 KB
testcase_15 AC 35 ms
53,540 KB
testcase_16 AC 36 ms
53,540 KB
testcase_17 AC 36 ms
53,540 KB
testcase_18 AC 36 ms
53,540 KB
testcase_19 AC 36 ms
53,540 KB
testcase_20 AC 36 ms
53,312 KB
testcase_21 AC 35 ms
53,540 KB
testcase_22 AC 38 ms
53,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fac = [1.0]*101
for i in range(1,101):
    fac[i] = fac[i-1]*i
a,n,k = map(int,input().split())
ans = p = 0.0
for x in range(1,a+1):
    q = 0.0
    for z in range(k):
        q += fac[n]/fac[z]/fac[n-z]*pow(x/a,n-z)*pow((a-x)/a,z)
    ans += x*(q-p)
    p = q
print(ans)
0