結果
問題 |
No.419 直角三角形
|
ユーザー |
![]() |
提出日時 | 2023-09-03 12:42:11 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 26 ms / 1,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 4,335 ms |
コンパイル使用メモリ | 250,396 KB |
最終ジャッジ日時 | 2025-02-16 18:23:28 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=long double; ld pie=3.141592653589793; ll mod=998244353; ll inf=1009999999999999990; int main(){ ld a,b; cin >> a >> b; if (a>b) { swap(a,b); } if (a==b) { cout << setprecision(100) << sqrt(b*b+a*a) << endl; }else{ cout << setprecision(100) << sqrt(b*b-a*a) << endl; } }