結果
| 問題 | No.1180 無限和 |
| コンテスト | |
| ユーザー |
57tggx
|
| 提出日時 | 2020-10-20 11:12:17 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 542 ms |
| コンパイル使用メモリ | 95,444 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-14 16:00:25 |
| 合計ジャッジ時間 | 2,078 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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