結果
問題 |
No.1235 ζ関数
|
ユーザー |
![]() |
提出日時 | 2020-09-24 00:46:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 697 bytes |
コンパイル時間 | 1,369 ms |
コンパイル使用メモリ | 162,636 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-20 00:32:30 |
合計ジャッジ時間 | 2,179 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; double Ans=1; long long int N2=1; long long int N3=1; long long int N4=1; long long int N5=1; if(N<=21){ for(int i=0;i<N; i++){ N2=2LL*N2; N3=3LL*N3; N4=4LL*N4; N5=5LL*N5; } } if(N>=31){ cout << Ans << endl; } if(N>=21 && N<=30){ Ans=1.0+1.0/N2; cout << Ans << endl; } if(N>=17 && N<=20){ Ans=1.0+1.0/N2+1.0/N3; cout << Ans << endl; } if(N>=12 && N<=16){ Ans=1.0+1.0/N2+1.0/N3+1.0/N4; cout << Ans << endl; } if(N==11){ Ans=1.0+1.0/N2+1.0/N3+1.0/N4+1.0/N5; cout << Ans << "4" << endl; } if(N==10){ Ans=1.0+1.0/N2+1.0/N3+1.0/N4+1.0/N5+1.0/(N2*N3); cout << Ans << "4" << endl; } }