結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 499 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 495 ms
4,376 KB
testcase_03 AC 489 ms
4,376 KB
testcase_04 AC 502 ms
4,376 KB
testcase_05 AC 498 ms
4,380 KB
testcase_06 AC 493 ms
4,380 KB
testcase_07 AC 493 ms
4,376 KB
testcase_08 AC 487 ms
4,376 KB
testcase_09 AC 493 ms
4,376 KB
testcase_10 AC 495 ms
4,376 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 490 ms
4,380 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 488 ms
4,376 KB
testcase_17 AC 494 ms
4,380 KB
testcase_18 AC 491 ms
4,380 KB
testcase_19 AC 499 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 87 ms
4,380 KB
testcase_22 AC 444 ms
4,376 KB
testcase_23 AC 345 ms
4,380 KB
testcase_24 AC 376 ms
4,380 KB
testcase_25 AC 331 ms
4,380 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 47 ms
4,380 KB
testcase_29 AC 6 ms
4,376 KB
testcase_30 AC 91 ms
4,376 KB
testcase_31 AC 300 ms
4,380 KB
testcase_32 AC 49 ms
4,380 KB
testcase_33 AC 295 ms
4,376 KB
testcase_34 AC 292 ms
4,376 KB
testcase_35 AC 445 ms
4,376 KB
testcase_36 AC 115 ms
4,380 KB
testcase_37 AC 59 ms
4,376 KB
testcase_38 AC 175 ms
4,380 KB
testcase_39 AC 219 ms
4,380 KB
testcase_40 AC 500 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 <= 10000; i++) ans += cal(i);
	printf("%.0lf\n", ans * 1E6);
}
0