結果
問題 |
No.1235 ζ関数
|
ユーザー |
👑 ![]() |
提出日時 | 2020-09-30 15:15:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 323 bytes |
コンパイル時間 | 1,337 ms |
コンパイル使用メモリ | 161,520 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-06-20 10:41:51 |
合計ジャッジ時間 | 2,222 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
#include<bits/stdc++.h> using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { int N; cin >> N; double ans = 0.; rep(i, 1000000 / N) ans += pow(double(i + 1), -N); cout << fixed << setprecision(10) << ans << endl; return 0; }