結果
問題 | No.567 コンプリート |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:18:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 257 ms / 2,000 ms |
コード長 | 458 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 82,440 KB |
実行使用メモリ | 82,580 KB |
最終ジャッジ日時 | 2025-03-20 21:19:38 |
合計ジャッジ時間 | 4,817 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 |
ソースコード
import mathfrom decimal import Decimal, getcontext# Set a high precision to handle large exponents accuratelygetcontext().prec = 1000n = int(input())sum_p = Decimal(0)for k in range(0, 7):comb = math.comb(6, k)sign = (-1) ** kterm = Decimal(comb) * Decimal(sign) * (Decimal(6 - k) / Decimal(6)) ** nsum_p += term# Format the output to print up to 12 decimal places, trailing zeros may be omittedprint("{0:.12f}".format(sum_p))