結果

問題 No.419 直角三角形
ユーザー Ktakuya332C
提出日時 2016-09-09 23:11:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 1,415 ms
コンパイル使用メモリ 58,072 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-16 18:31:52
合計ジャッジ時間 2,676 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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