結果
| 問題 | No.419 直角三角形 |
| コンテスト | |
| ユーザー |
manini
|
| 提出日時 | 2016-09-11 01:12:48 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 1,558 ms |
| コンパイル使用メモリ | 81,480 KB |
| 実行使用メモリ | 41,568 KB |
| 最終ジャッジ日時 | 2026-05-12 04:10:52 |
| 合計ジャッジ時間 | 3,860 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / tmp-judge_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 3 |
ソースコード
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
long a=s.nextInt();
long b=s.nextInt();
if(a!=b){
long max=Math.max(a, b);
long min=Math.min(a, b);
double c=Math.sqrt((double)max*max-min*min);
System.out.println(c);
}else{
double c=Math.sqrt((double)a*a-b*b);
System.out.println(c);
}
}
}
manini