結果

問題 No.419 直角三角形
ユーザー 826814741_6826814741_6
提出日時 2019-01-07 19:34:34
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 330 ms / 1,000 ms
コード長 225 bytes
コンパイル時間 11,187 ms
コンパイル使用メモリ 426,464 KB
実行使用メモリ 57,192 KB
最終ジャッジ日時 2024-04-30 19:51:25
合計ジャッジ時間 20,090 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 326 ms
57,104 KB
testcase_01 AC 321 ms
57,096 KB
testcase_02 AC 324 ms
56,964 KB
testcase_03 AC 324 ms
57,116 KB
testcase_04 AC 328 ms
57,064 KB
testcase_05 AC 322 ms
56,980 KB
testcase_06 AC 321 ms
56,952 KB
testcase_07 AC 324 ms
57,000 KB
testcase_08 AC 322 ms
56,956 KB
testcase_09 AC 328 ms
57,192 KB
testcase_10 AC 327 ms
56,952 KB
testcase_11 AC 323 ms
56,880 KB
testcase_12 AC 325 ms
57,072 KB
testcase_13 AC 327 ms
57,064 KB
testcase_14 AC 323 ms
57,140 KB
testcase_15 AC 328 ms
56,944 KB
testcase_16 AC 324 ms
57,096 KB
testcase_17 AC 324 ms
57,116 KB
testcase_18 AC 330 ms
57,184 KB
testcase_19 AC 329 ms
56,988 KB
testcase_20 AC 326 ms
56,960 KB
testcase_21 AC 330 ms
56,960 KB
testcase_22 AC 327 ms
56,968 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