結果
| 問題 | No.567 コンプリート | 
| コンテスト | |
| ユーザー |  mogurocker | 
| 提出日時 | 2017-10-15 04:23:08 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 705 bytes | 
| コンパイル時間 | 1,502 ms | 
| コンパイル使用メモリ | 157,684 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-14 15:53:54 | 
| 合計ジャッジ時間 | 1,915 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 12 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;
typedef pair<int, int> P;
int n;
int main(int argc, char const *argv[]) {
	ios_base::sync_with_stdio(false);
	cin >> n;
	double one = pow(1/6.0, n);
	double two = pow(2/6.0, n) - 2*one;
	double three = pow(3/6.0, n) - 3*one - 3*two;
	double four = pow(4/6.0, n) - 4*one - 6*two - 4*three;
	double five = pow(5/6.0, n) - 5*one - 10*two - 10*three - 5*four;
	double six = 1.0 - 6*one - 15*two - 20*three - 15*four - 6*five;
	printf("%.10lf\n", six);
	return 0;
}
            
            
            
        