結果
| 問題 | No.419 直角三角形 |
| コンテスト | |
| ユーザー |
sasa
|
| 提出日時 | 2025-03-19 16:53:14 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 37,248 KB |
| 実行使用メモリ | 5,760 KB |
| 最終ジャッジ日時 | 2026-07-07 06:36:06 |
| 合計ジャッジ時間 | 1,620 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#include <stdio.h>
int main(void){
double A, B;
scanf("%lf%lf",&A, &B);
double ans = 0;
if(A > B){
if((A * A) - (B * B) == 0){
ans = (A * A) + (B * B);
}else{
ans = (A * A) - (B * B);
}
}else{
if((B * B) - (A * A) == 0){
ans = (B * B) + (A * A);
}else{
ans = (B * B) - (A * A);
}
}
printf("%lf",ans);
}
sasa