結果
| 問題 |
No.1408 Nice Dice Game
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-02-26 21:49:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 552 bytes |
| コンパイル時間 | 3,613 ms |
| コンパイル使用メモリ | 250,540 KB |
| 最終ジャッジ日時 | 2025-01-19 05:11:29 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 |
| other | TLE * 36 |
ソースコード
#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>10000000.0)break;
for(double b=a+1.0;true;b+=1.0){
if(a*b>10000000.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;
}
沙耶花