結果
問題 |
No.567 コンプリート
|
ユーザー |
|
提出日時 | 2019-08-29 19:29:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 481 ms / 2,000 ms |
コード長 | 333 bytes |
コンパイル時間 | 1,847 ms |
コンパイル使用メモリ | 194,264 KB |
最終ジャッジ日時 | 2025-01-07 15:36:30 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; cin>>n; double dp[n+1][7]{}; dp[0][0]=1; for (int i=1;i<=n;i++) for (int j=1;j<=6;j++) dp[i][j]=dp[i-1][j-1]*(6-j+1)/6.0+dp[i-1][j]*j/6.0; cout<<fixed<<setprecision(7)<<dp[n][6]<<endl; return 0; }