結果
| 問題 |
No.1273 はじめのζ関数
|
| コンテスト | |
| ユーザー |
ocvret_
|
| 提出日時 | 2020-10-30 22:00:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 725 bytes |
| コンパイル時間 | 1,606 ms |
| コンパイル使用メモリ | 166,412 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 00:37:07 |
| 合計ジャッジ時間 | 2,832 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 1 WA * 39 |
ソースコード
#include<bits/stdc++.h>
//#include<atcoder/all>
using namespace std;
//using namespace atcoder;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007
int main(){
cout << fixed << setprecision(20);
int x;
cin >> x;
long double res = 0;
if(x == 2){
cout << 1000000 << "\n";
return 0;
}
for(int n = x;n <= 100;n++){
long double g = 0;
for(int i = 1;;i++){
__int128_t po = 1;
rep(j,n)po = po*i;
if(po > (ll)1e16)break;
g += 1.0/po;
}
res += g-1;
}
res *= 1000000;
cout << (ll)res << "\n";
cout << res << "\n";
return 0;
}
ocvret_