結果

問題 No.57 ミリオンダイス
ユーザー commycommy
提出日時 2017-10-09 17:43:32
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 689 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-28 14:22:23
合計ジャッジ時間 1,087 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)

using namespace std;

typedef long long int lli;

int main() {
    int N;
    cin >> N;
    /*
    vector<vector<lli>> dp(N + 1, vector<lli>(6 * N + 1, 0));
    dp[0][0] = 1;
    REP (i, 0, N) REP (j, 0, 6 * N + 1) {
        REP (k, 1, 7) {
            if (j + k <= 6 * N) dp[i + 1][j + k] += dp[i][j];
        }
    }
    double ans = 0.0;
    REP (i, 0, 6 * N + 1) ans += dp[N][i] * i;
    REP (i, 0, N) ans /= 6;
    cout << fixed << setprecision(10) << ans << endl;
    */
    cout << fixed << setprecision(10) << 3.5 * N << endl;
    return 0;
}
0