結果
問題 | No.1273 はじめのζ関数 |
ユーザー |
|
提出日時 | 2020-10-30 22:03:32 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 395 bytes |
コンパイル時間 | 1,588 ms |
コンパイル使用メモリ | 167,028 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-22 00:39:46 |
合計ジャッジ時間 | 5,030 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 + 2000; i++) { double z = 0; for (ll j = 1; j < 2000; j++) { z += 1 / pow(j, i); } ans += z - 1; } cout << (int)(ans * 1000000) << "\n"; }