結果
問題 |
No.419 直角三角形
|
ユーザー |
![]() |
提出日時 | 2020-09-11 17:12:45 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 3,637 ms |
コンパイル使用メモリ | 74,500 KB |
実行使用メモリ | 41,336 KB |
最終ジャッジ日時 | 2024-12-26 05:23:57 |
合計ジャッジ時間 | 8,065 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 3 |
ソースコード
import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int max = Math.max(a, b); int min = Math.min(a, b); System.out.println(Math.sqrt(Math.pow(max, 2) - Math.pow(min, 2))); } }