結果

問題 No.419 直角三角形
ユーザー 826814741_6826814741_6
提出日時 2019-01-07 19:34:34
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 298 ms / 1,000 ms
コード長 225 bytes
コンパイル時間 11,960 ms
コンパイル使用メモリ 416,864 KB
実行使用メモリ 53,144 KB
最終ジャッジ日時 2023-08-13 01:16:06
合計ジャッジ時間 20,644 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 294 ms
52,968 KB
testcase_01 AC 298 ms
52,908 KB
testcase_02 AC 297 ms
52,960 KB
testcase_03 AC 292 ms
53,132 KB
testcase_04 AC 292 ms
52,908 KB
testcase_05 AC 298 ms
53,060 KB
testcase_06 AC 296 ms
52,908 KB
testcase_07 AC 296 ms
53,144 KB
testcase_08 AC 295 ms
53,012 KB
testcase_09 AC 297 ms
52,976 KB
testcase_10 AC 295 ms
52,936 KB
testcase_11 AC 294 ms
52,892 KB
testcase_12 AC 294 ms
53,004 KB
testcase_13 AC 295 ms
52,932 KB
testcase_14 AC 297 ms
52,820 KB
testcase_15 AC 296 ms
52,972 KB
testcase_16 AC 297 ms
52,888 KB
testcase_17 AC 295 ms
52,924 KB
testcase_18 AC 298 ms
52,876 KB
testcase_19 AC 295 ms
53,060 KB
testcase_20 AC 296 ms
52,836 KB
testcase_21 AC 293 ms
52,980 KB
testcase_22 AC 293 ms
52,784 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import kotlin.math.*

fun f(a: Double, b: Double): Double =
    if (a==b) sqrt(2F)*a else sqrt(abs(a*a-b*b))

fun main(args: Array<String>) {
    val (a,b) = readLine()!!.split(' ').map(String::toDouble)
    println(f(a,b))
}
0