結果
| 問題 |
No.1273 はじめのζ関数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-30 22:00:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 479 bytes |
| コンパイル時間 | 729 ms |
| コンパイル使用メモリ | 71,436 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 00:37:16 |
| 合計ジャッジ時間 | 1,759 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 39 WA * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int x;
cin >> x;
double ans = 0;
for(int i = x; i <= 10000; i++){
for(int j = 2; j <= 100000; j++){
if(pow((double)j, (double)i) >= 1e18) break;
ans += 1.0 / pow((double)j, (double)i);
}
}
ans *= 1e8;
long long t = ans;
cout << t / 100 << endl;
}