Submission #00119


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "bits/stdc++.h"
#define MOD 1000000007
#define INF 11234567890
#define in std::cin
#define out std::cout
#define rep(i,N) for(LL i=0;i<N;++i)
typedef long long int LL;
int n;
long double ans, myPI = 3.141592;
int main()
{
in >> n;
ans = 2 * sin(myPI / n);
out << ans*n/2 << std::endl;
return 0;
}

ステータス

項目 データ
問題 0004 - 円周率
ユーザー名 Bwambocos
投稿日時 2017-03-30 21:35:00
言語 C++
状態 Accepted
得点 5
ソースコード長 332 Byte
最大実行時間 23 ms
最大メモリ使用量 568 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
1.in AC 14 ms 476 KB
1
2.in AC 19 ms 460 KB
1
3.in AC 18 ms 568 KB
1
4.in AC 19 ms 552 KB
1
5.in AC 17 ms 536 KB
1
6.in AC 18 ms 520 KB
1
7.in AC 23 ms 376 KB
1
8.in AC 22 ms 484 KB
1