結果

問題 No.567 コンプリート
ユーザー HIR180HIR180
提出日時 2017-09-08 22:31:04
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 911 bytes
コンパイル時間 1,114 ms
コンパイル使用メモリ 143,704 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-21 05:50:27
合計ジャッジ時間 2,024 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
double hoge[7],ret;
int main(){int n;cin>>n;
	for(int i=1;i<=5;i++){
		//6Ci * (i/6)^n
		double x = 72.0;
		for(int j=1;j<=i;j++) x/=(double)j;
		for(int j=1;j<=6-i;j++) x/=(double)j;
		double f = (double)i/6.0;
		for(int j=0;j<n;j++) x*=f;
		if(i%2==1) ret-=x; else ret+=x;
	}
	printf("%.12f\n",ret*10.0+1.0);
}
0