結果
問題 |
No.1408 Nice Dice Game
|
ユーザー |
![]() |
提出日時 | 2021-02-26 21:49:57 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 550 bytes |
コンパイル時間 | 3,825 ms |
コンパイル使用メモリ | 251,484 KB |
最終ジャッジ日時 | 2025-01-19 05:13:16 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 32 WA * 1 TLE * 3 |
ソースコード
#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>5000000.0)break; for(double b=a+1.0;true;b+=1.0){ if(a*b>5000000.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; }