結果

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

ソースコード

diff #

#include <iostream>
#include <iomanip>//小数点出力用
#include <cmath>
using namespace std;
int main() {
	double A, B, C;
	cin >> A >> B >> C;
	double S = 1;
	S *= (A + B + C) / 2;
	S *= (- A + B + C) / 2;
	S *= (A - B + C) / 2;
	S *= (A + B - C) / 2;
	S = sqrt(S);
	double P = A + B + C;
	cout << fixed << setprecision(15) << (double)2 * S / P;
	return 0;
}
0