結果
問題 |
No.419 直角三角形
|
ユーザー |
![]() |
提出日時 | 2017-03-02 23:32:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 387 bytes |
コンパイル時間 | 684 ms |
コンパイル使用メモリ | 68,492 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-13 01:55:26 |
合計ジャッジ時間 | 1,596 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include<iostream> #include<algorithm> #include<string> #include<cmath> #include<iomanip> using namespace std; //typedef __int64 LL; int main(){ long double a,b; cin>>a>>b; if(a>b)cout<<fixed<<setprecision(15)<<sqrt(a*a-b*b)<<endl; if(a<b)cout<<fixed<<setprecision(15)<<sqrt(-a*a+b*b)<<endl; if(a==b)cout<<fixed<<setprecision(15)<<sqrt(a*a+b*b)<<endl; return 0; }