結果

問題 No.419 直角三角形
ユーザー ku_material_ro
提出日時 2016-09-10 01:10:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 298 bytes
コンパイル時間 873 ms
コンパイル使用メモリ 65,580 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-16 19:11:59
合計ジャッジ時間 1,352 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include <math.h>
#include <string>
#include <iomanip>
using namespace std;

int main(){
	double a, b;
	cin >> a >> b ;
	if (a > b){
		cout << sqrt(a*a-b*b) << endl;
	}
	else if (a < b){
		cout << sqrt(b*b - a*a) << endl;
	}else{
		cout << a*sqrt(2) << endl;
	}
	



	return 0;
}
0