結果

問題 No.3151 natural math of inscribed circle
ユーザー tobbie
提出日時 2025-05-28 08:29:36
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 2,083 ms
コンパイル使用メモリ 192,624 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-06-20 03:03:35
合計ジャッジ時間 2,593 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; i++)

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  double s = (double)(a + b + c) / 2;
  double ss = sqrt(s * (s-a) * (s-b) * (s-c));
  double r = ss * 2 / (a + b + c);
  cout << fixed << setprecision(10) << r << endl;
  return 0;
}
0