Submission #00031
ソースコード
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #include<map> #include<set> #include<list> #include<cmath> #include<queue> #include<stack> #include<cstdio> #include<string> #include<vector> #include<complex> #include<cstdlib> #include<cstring> #include<numeric> #include<sstream> #include<iostream> #include<algorithm> #include<functional> #define mp make_pair #define pb push_back #define all(x) (x).begin(),(x).end() #define YES() printf("YES\n") #define NO() printf("NO\n") using namespace std; #define int long long //typedef long long ll; typedef unsigned long long ull; typedef vector< bool > vb; typedef vector< int > vi; typedef vector<vb> vvb; typedef vector<vi> vvi; typedef pair< int , int > P; const int INF=1e+9; const double EPS=1e-9; const double PI = 3.141592653589793; const int dx[]={1,0,-1,0},dy[]={0,-1,0,1}; signed main(){ double n; cin >> n; double d = sin (2 * PI / n),deg = (PI - (2 * PI / n)) / 2; printf ( "%.9f\n" ,d / sin (deg) * n / 2); return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - 円周率 |
ユーザー名 | Hoget157 |
投稿日時 | 2017-03-30 20:12:34 |
言語 | C++11 |
状態 | Accepted |
得点 | 5 |
ソースコード長 | 1057 Byte |
最大実行時間 | 26 ms |
最大メモリ使用量 | 716 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 5 / 5 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
1.in | AC | 23 ms | 476 KB |
1
|
2.in | AC | 17 ms | 716 KB |
1
|
3.in | AC | 21 ms | 572 KB |
1
|
4.in | AC | 16 ms | 428 KB |
1
|
5.in | AC | 23 ms | 416 KB |
1
|
6.in | AC | 26 ms | 404 KB |
1
|
7.in | AC | 18 ms | 392 KB |
1
|
8.in | AC | 22 ms | 508 KB |
1
|