結果
| 問題 | 
                            No.1235 ζ関数
                             | 
                    
| ユーザー | 
                             Hydrogen1008
                         | 
                    
| 提出日時 | 2020-09-24 00:38:56 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 701 bytes | 
| コンパイル時間 | 1,474 ms | 
| コンパイル使用メモリ | 166,944 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-28 04:44:29 | 
| 合計ジャッジ時間 | 2,192 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 18 WA * 3 | 
ソースコード
#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+0.000004;
cout << Ans << endl;
}
if(N==10){
    Ans=1.0+1.0/N2+1.0/N3+1.0/N4+1.0/N5+1.0/(N2*N3)+0.000004;
cout << Ans << endl;
}
}
            
            
            
        
            
Hydrogen1008