結果
| 問題 | No.567 コンプリート |
| コンテスト | |
| ユーザー |
teketeke5000
|
| 提出日時 | 2017-09-14 01:05:30 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 396 bytes |
| 記録 | |
| コンパイル時間 | 806 ms |
| コンパイル使用メモリ | 177,664 KB |
| 実行使用メモリ | 58,680 KB |
| 最終ジャッジ日時 | 2026-09-20 21:00:58 |
| 合計ジャッジ時間 | 2,247 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 10 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void) {
ll N;
cin >> N;
double dp[N+1][7];
dp[1][0] = 0;
dp[1][1] = 1;
for (int i=2; i<=6; i++) dp[1][i] = 0;
for (int i=2; i<=N; i++) for (int j=1; j<=6; j++) {
dp[i][j] = ( (dp[i-1][j] * j) + (dp[i-1][j-1] * (7-j)) ) / 6;
}
printf("%.10f\n",dp[N][6]);
return 0;
}
teketeke5000