結果

問題 No.419 直角三角形
コンテスト
ユーザー aRac
提出日時 2016-11-23 20:53:20
言語 Scala(Beta)
(3.7.4)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 305 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 9,278 ms
コンパイル使用メモリ 255,392 KB
実行使用メモリ 16,216 KB
最終ジャッジ日時 2025-12-26 03:04:08
合計ジャッジ時間 13,939 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1 -- * 2
other -- * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

object Main {
    def solve(n: Int, m: Int) = {
        if (n == m) math.sqrt(math.pow(m, 2) + math.pow(n, 2))
        else math.sqrt(math.abs(math.pow(n, 2) - math.pow(m, 2)))
    }
    val Array(a, b) = io.StdIn.readLine.split(" ")
    def main(args: Array[String]) = println(solve(a.toInt, b.toInt))
}
0