結果

問題 No.1408 Nice Dice Game
ユーザー 沙耶花
提出日時 2021-02-26 21:56:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 549 bytes
コンパイル時間 3,998 ms
コンパイル使用メモリ 250,228 KB
最終ジャッジ日時 2025-01-19 05:22:46
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other AC * 30 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint1000000007;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000001


int main(){
	
	int N;
	cin>>N;
	
	double ans = 0.0;
	
	for(double a=1.0;true;a+=1.0){
		if(a>200000.0)break;
		for(double b=a+1.0;true;b+=1.0){
			if(a*b>1000000.0)break;
			double temp = pow(1.0/a,N) - pow(1.0/b,N);
			temp /= b;
			temp /= b-a;
			ans += temp;
		}
	}
	
	cout<<fixed<<setprecision(10)<<ans<<endl;
	
    return 0;
}
0