結果
| 問題 | No.567 コンプリート | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2017-09-12 17:29:57 | 
| 言語 | D (dmd 2.109.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 2,000 ms | 
| コード長 | 533 bytes | 
| コンパイル時間 | 2,464 ms | 
| コンパイル使用メモリ | 155,392 KB | 
| 実行使用メモリ | 17,392 KB | 
| 最終ジャッジ日時 | 2024-06-12 21:55:42 | 
| 合計ジャッジ時間 | 3,124 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 12 | 
ソースコード
import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;
void main() {
    auto N = readln.chomp.to!int;
    N = min(10000, N);
    auto dp = new real[][](N + 1, 1 << 6);
    foreach (i; 0..N+1) fill(dp[i], 0);
    dp[0][0] = 1;
    foreach (i; 0..N)
        foreach (j; 0..64)
            foreach (k; 0..6)
                dp[i+1][j | (1 << k)] += dp[i][j] / 6;
    writefln("%.9f", dp[N][(1 << 6) - 1]);
}
            
            
            
        