結果

問題 No.1180 無限和
ユーザー kyoprounokyoprouno
提出日時 2020-08-21 23:18:18
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 945 bytes
コンパイル時間 1,829 ms
コンパイル使用メモリ 173,280 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 06:20:05
合計ジャッジ時間 2,989 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize("O3")
#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 ll INF=1e9+7;

const ll mod=1e9+7;

int main(){
    long double n;
    cin >> n;
    long double pi=acos(-1);
    long double ans=1.0;
    for(ll i=1;i<=n;i++){
        long double s=i;
        ans*=pi*pi/(s+1.0)/(s+2.0);
    }
    ll val=ans;
    cout << val << endl;
    return 0;
    
}
0