結果
| 問題 |
No.1180 無限和
|
| コンテスト | |
| ユーザー |
57tggx
|
| 提出日時 | 2020-10-20 11:12:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 355 bytes |
| コンパイル時間 | 798 ms |
| コンパイル使用メモリ | 77,152 KB |
| 最終ジャッジ日時 | 2025-01-15 11:56:54 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 40 |
ソースコード
#define _USE_MATH_DEFINES
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int ans;
int a;
double cons;
cin >> a;
cons = (pow(M_PI, 2.0))/6;
/*ans = (-1/3)*pow(M_PI, 4.0)*pow(1/sin(M_PI/a), 2.0)*(2pow(1/tan(M_PI/a), 2.0)+pow(1/sin(M_PI/a), 2.0));*/
ans = (1./a)*pow(cons, a);
cout << ans << endl;
}
57tggx