結果
| 問題 |
No.1273 はじめのζ関数
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2020-10-30 21:57:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 359 bytes |
| コンパイル時間 | 2,150 ms |
| コンパイル使用メモリ | 196,308 KB |
| 最終ジャッジ日時 | 2025-01-15 17:17:45 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 40 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
int x;
cin>>x;
if(x==2) cout<<1000000<<endl;
else{
double sum=0;
for(double i=2;i<x;i++) sum+=riemann_zeta(i)-1;
cout<<floor((1-sum)*1000000)<<endl;
}
return 0;
}
umezo