結果
問題 |
No.567 コンプリート
|
ユーザー |
|
提出日時 | 2019-08-29 19:17:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 367 bytes |
コンパイル時間 | 2,211 ms |
コンパイル使用メモリ | 193,112 KB |
最終ジャッジ日時 | 2025-01-07 15:36:20 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 1 WA * 11 |
ソースコード
#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)/6.0; dp[i][j]+=dp[i-1][j]*j/6.0; } cout<<fixed<<setprecision(7)<<dp[n][6]<<endl; return 0; }