結果

問題 No.1273 はじめのζ関数
ユーザー iaNTUiaNTU
提出日時 2020-11-25 22:35:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 294 bytes
コンパイル時間 1,367 ms
コンパイル使用メモリ 163,000 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-10-01 01:59:15
合計ジャッジ時間 38,460 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 980 ms
4,376 KB
testcase_01 WA -
testcase_02 AC 987 ms
4,376 KB
testcase_03 AC 973 ms
4,376 KB
testcase_04 AC 986 ms
4,380 KB
testcase_05 AC 976 ms
4,380 KB
testcase_06 AC 975 ms
4,380 KB
testcase_07 AC 972 ms
4,380 KB
testcase_08 AC 967 ms
4,376 KB
testcase_09 AC 975 ms
4,380 KB
testcase_10 AC 978 ms
4,380 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 969 ms
4,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 990 ms
4,376 KB
testcase_17 AC 1,004 ms
4,376 KB
testcase_18 AC 999 ms
4,376 KB
testcase_19 AC 982 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 575 ms
4,380 KB
testcase_22 AC 931 ms
4,376 KB
testcase_23 AC 826 ms
4,376 KB
testcase_24 AC 865 ms
4,380 KB
testcase_25 AC 815 ms
4,384 KB
testcase_26 AC 496 ms
4,376 KB
testcase_27 AC 490 ms
4,376 KB
testcase_28 AC 535 ms
4,380 KB
testcase_29 AC 503 ms
4,384 KB
testcase_30 AC 593 ms
4,376 KB
testcase_31 AC 799 ms
4,376 KB
testcase_32 AC 546 ms
4,380 KB
testcase_33 AC 793 ms
4,376 KB
testcase_34 AC 769 ms
4,380 KB
testcase_35 AC 930 ms
4,376 KB
testcase_36 AC 617 ms
4,384 KB
testcase_37 AC 555 ms
4,380 KB
testcase_38 AC 659 ms
4,380 KB
testcase_39 AC 710 ms
4,376 KB
testcase_40 AC 989 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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