結果
| 問題 |
No.1180 無限和
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-11-09 16:00:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 233 bytes |
| コンパイル時間 | 1,814 ms |
| コンパイル使用メモリ | 193,440 KB |
| 最終ジャッジ日時 | 2025-02-08 19:26:30 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 40 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ld = long double;
int main() {
int n;
cin>>n;
ld an=1,p=atan2(ld(1),ld(1))*ld(4.0);
p=p*p/ld(6);
for(int i=0;i<n;i++)an*=p;
cout<<long(floor(an/n))<<endl;
}