結果
| 問題 | No.567 コンプリート | 
| コンテスト | |
| ユーザー |  Fu_L | 
| 提出日時 | 2020-09-28 01:16:33 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 395 bytes | 
| コンパイル時間 | 1,538 ms | 
| コンパイル使用メモリ | 165,968 KB | 
| 実行使用メモリ | 159,872 KB | 
| 最終ジャッジ日時 | 2024-06-30 17:18:26 | 
| 合計ジャッジ時間 | 5,130 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 WA * 1 | 
| other | AC * 2 WA * 9 TLE * 1 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll MOD=1000000007;
long double ans[1000005][10];
int main(void){
    ll n;
    cin>>n;
    ans[0][0]=1;
    for(int i=0;i<=n;i++){
        for(int j=0;j<=6;j++){
            ans[i+1][j+1]+=ans[i][j]*(6-j)/6;
            ans[i+1][j]+=ans[i][j]*j/6;
        }
    }
    cout<<ans[n][6]<<endl;
    
}
            
            
            
        