結果

問題 No.419 直角三角形
ユーザー HujiLeeHujiLee
提出日時 2016-11-25 23:32:01
言語 Scala(Beta)
(3.4.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 8,194 ms
コンパイル使用メモリ 262,084 KB
実行使用メモリ 63,148 KB
最終ジャッジ日時 2023-09-12 07:37:23
合計ジャッジ時間 32,594 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 926 ms
62,284 KB
testcase_01 AC 919 ms
62,324 KB
testcase_02 AC 929 ms
63,148 KB
testcase_03 AC 924 ms
62,192 KB
testcase_04 AC 930 ms
62,144 KB
testcase_05 AC 920 ms
62,368 KB
testcase_06 AC 933 ms
62,484 KB
testcase_07 AC 930 ms
62,312 KB
testcase_08 WA -
testcase_09 AC 919 ms
62,300 KB
testcase_10 AC 920 ms
62,204 KB
testcase_11 AC 916 ms
62,188 KB
testcase_12 WA -
testcase_13 AC 918 ms
62,216 KB
testcase_14 AC 915 ms
62,204 KB
testcase_15 AC 922 ms
62,468 KB
testcase_16 AC 918 ms
62,184 KB
testcase_17 AC 918 ms
62,304 KB
testcase_18 AC 914 ms
62,296 KB
testcase_19 AC 915 ms
62,380 KB
testcase_20 AC 917 ms
62,248 KB
testcase_21 AC 994 ms
62,676 KB
testcase_22 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn

/**
  * Created by Administrator on 2016/11/25 0025.
  */
object Main extends App {
  val Array(a, b) = StdIn.readLine().split(" ").map(x => x.toInt)
  val long = math.max(a, b)
  val short = math.min(a, b)
  println(
    math.pow(
      1*math.pow(long,2)-math.pow(short,2)
      , 0.5
    )
  )

}
0