結果

問題 No.1273 はじめのζ関数
ユーザー iaNTU
提出日時 2020-11-25 22:35:52
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 1,578 ms
コンパイル使用メモリ 167,200 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-23 19:30:17
合計ジャッジ時間 17,146 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 34 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

double cal(int x) {
	double ans = 0;
	for (int i = 2; i < 1000; i++) ans += pow(1.0 / i, x);
	return ans;
}

int main() {
	double ans = 0;
	int x;
	scanf("%d", &x);
	for (int i = x; i <= 20000; i++) ans += cal(i);
	printf("%.0lf\n", ans * 1E6);
}
0