結果
問題 | No.419 直角三角形 |
ユーザー |
![]() |
提出日時 | 2018-01-15 21:11:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 462 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 81,060 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 03:29:27 |
合計ジャッジ時間 | 1,515 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <string> #include <sstream> #include <cmath> #include <stack> #include <cctype> #include <stdio.h> #include <map> #include <string.h> using namespace std; int main() { double a=0.0,b=0.0; cin>>a>>b; if(a<b){ swap(a,b); } if(a==b){ cout<<setprecision(10)<<sqrt((a*a)+(b*b))<<endl; return 0; } cout<<setprecision(10)<<sqrt((a*a)-(b*b))<<endl; return 0; }