結果

問題 No.419 直角三角形
ユーザー springrollspringroll
提出日時 2018-11-17 22:40:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 244 bytes
コンパイル時間 1,773 ms
コンパイル使用メモリ 165,604 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-24 14:41:59
合計ジャッジ時間 2,464 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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


int main() {
	double a, b;
	cin >> a >> b;

	double A,B,C;

	A = a*a-b*b;	if(A<0) A=1e9;
	B = b*b-a*a;	if(B<0) B=1e9;
	C = a*a+b*b;	if(C<0) C=1e9;

	printf("%.10f\n", sqrt(min(A, min(B, C))));


}
0