結果
問題 | No.1273 はじめのζ関数 |
ユーザー |
|
提出日時 | 2020-10-30 22:03:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 1,514 ms |
コンパイル使用メモリ | 165,836 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 00:39:24 |
合計ジャッジ時間 | 3,262 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 39 WA * 1 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; int main() { ll x; cin >> x; double ans = 0; for (ll i = x; i < x + 1000; i++) { double z = 0; for (ll j = 1; j < 1000; j++) { z += 1 / pow(j, i); } ans += z - 1; } cout << (int)(ans * 1000000) << "\n"; }