結果

問題 No.1273 はじめのζ関数
ユーザー kyoprounokyoprouno
提出日時 2020-10-30 22:02:14
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,529 bytes
コンパイル時間 1,898 ms
コンパイル使用メモリ 172,780 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-29 06:07:41
合計ジャッジ時間 3,482 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 WA -
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 2 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 2 ms
4,380 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,376 KB
testcase_19 AC 2 ms
4,376 KB
testcase_20 WA -
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,380 KB
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 1 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 1 ms
4,380 KB
testcase_32 AC 1 ms
4,376 KB
testcase_33 AC 2 ms
4,380 KB
testcase_34 AC 1 ms
4,376 KB
testcase_35 AC 1 ms
4,380 KB
testcase_36 AC 1 ms
4,376 KB
testcase_37 AC 1 ms
4,380 KB
testcase_38 AC 2 ms
4,380 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
#include <algorithm>

#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define endl '\n'
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))

using namespace std;



template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}

const int INF=1e9;

const double pi=acos(-1);

int main(){
    int x;
    cin >> x;
    vector<double> p(25);
    p[2]=644934.0668;
    p[3]=202056.9032;
    p[4]=82323.23371;
    p[5]=36927.75514;
    p[6]=17343.06198;
    p[7]=8349.277382;
    p[8]=4077.356198;
    p[9]=2008.392826;
    p[10]=994.5751278;
    p[11]=494.1886041;
    p[12]=246.0865533;
    p[13]=122.7133476;
    p[14]=61.24813506;
    p[15]=30.58823631;
    p[16]=15.28225941;
    p[17]=7.637197638;
    p[18]=3.817293265;
    p[19]=1.908212717;
    p[20]=0.9539620339;
    p[21]=0.4769329868;
    p[22]=0.2384505027;
    p[23]=0.119219926;
    p[24]=0.05960818905;
    if(x>24) cout << 0 << endl;
    else{
        double ans=0.0;
        for(int i=x;i<=24;i++){
            ans+=p[i];
            
        }
        int val=ans;
        cout << val << endl;
    }
    
    return 0;
}
0