結果

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

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
    double a,b;
    cin>>a>>b;
    if(a<b)swap(a,b);
    double c1=sqrt(pow(a,2)-pow(b,2));
    double c2=sqrt(pow(a,2)+pow(b,2));
    cout<<fixed;
    cout.precision(9);
    cout<<min(c1,c2)<<endl;
    return 0;
}
0