結果
問題 | No.419 直角三角形 |
ユーザー |
|
提出日時 | 2016-09-09 23:14:48 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 326 bytes |
コンパイル時間 | 1,733 ms |
コンパイル使用メモリ | 65,876 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-16 18:33:08 |
合計ジャッジ時間 | 2,452 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <iostream>#include <string>#include <cmath>#include <iomanip>using namespace std;int main() {double a, b;cin >> a >> b;if ( a==b ) {cout << setprecision(9) << (double)sqrt(2) * (double)a;} else {cout << setprecision(9) << sqrt(abs(pow(a,2) - pow(b, 2))) << endl;;}}