Submission #00068


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
const double PI=acos(-1);
signed main(){
int N;
cin>>N;
complex<double>p1,p2;
p1=polar(0.5,0.0);
p2=polar(0.5,2*PI/N);
printf("%.20f\n",abs(p1-p2)*N);
return 0;
}

ステータス

項目 データ
問題 0004 - 円周率
ユーザー名 latte0119
投稿日時 2017-03-30 20:49:13
言語 C++11
状態 Accepted
得点 5
ソースコード長 647 Byte
最大実行時間 33 ms
最大メモリ使用量 580 KB

セット

セット 得点 Cases
1 ALL 5 / 5 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
1.in AC 22 ms 480 KB
1
2.in AC 33 ms 468 KB
1
3.in AC 26 ms 580 KB
1
4.in AC 27 ms 564 KB
1
5.in AC 17 ms 420 KB
1
6.in AC 19 ms 400 KB
1
7.in AC 18 ms 376 KB
1
8.in AC 17 ms 360 KB
1