結果
| 問題 |
No.1235 ζ関数
|
| ユーザー |
shinchan
|
| 提出日時 | 2020-09-21 15:53:09 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 496 bytes |
| コンパイル時間 | 1,229 ms |
| コンパイル使用メモリ | 163,216 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 10:40:30 |
| 合計ジャッジ時間 | 2,019 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007, INF=(1LL<<60);
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;
int main() {
cin.tie(0);
cout.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
double ans = 0;
for(double i=1.0;i<=100;i+=1.0){
double num = 1.0 / i;
ans += pow(num, n);
}
doublecout(ans);
return 0;
}
shinchan