結果

問題 No.3151 natural math of inscribed circle
ユーザー テナガザル
提出日時 2025-05-20 21:47:14
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 839 ms
コンパイル使用メモリ 111,388 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-20 02:59:53
合計ジャッジ時間 1,878 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  double s = (a + b + c) / 2.0;
  double ans = 2.0 * sqrt(s) / (a + b + c) * sqrt(s - a) * sqrt(s - b) * sqrt(s - c);
  printf("%.10f\n", ans);
}
0