結果
| 問題 |
No.1235 ζ関数
|
| ユーザー |
Hydrogen1008
|
| 提出日時 | 2020-09-24 00:33:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 538 bytes |
| コンパイル時間 | 1,545 ms |
| コンパイル使用メモリ | 166,200 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-28 04:44:21 |
| 合計ジャッジ時間 | 2,315 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
double Ans=1;
int N2=1;
int N3=1;
int N4=1;
int N5=1;
if(N<=21){
for(int i=0;i<N; i++){
N2=2*N2;
N3=3*N3;
N4=4*N4;
N5=5*N5;
}
}
if(N>=21){
cout << Ans << endl;
}
if(N>=17 && N<=20){
Ans=1.0+1.0/N2;
cout << Ans << endl;
}
if(N>=12 && N<=16){
Ans=1.0+1.0/N2+1.0/N3;
cout << Ans << endl;
}
if(N==11){
Ans=1.0+1.0/N2+1.0/N3+1.0/N4;
cout << Ans << endl;
}
if(N==10){
Ans=1.0+1.0/N2+1.0/N3+1.0/N4+1.0/N5;
cout << Ans << endl;
}
}
Hydrogen1008