結果

問題 No.735 接線
ユーザー javyjavy
提出日時 2018-10-24 15:46:02
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 287 ms / 2,000 ms
コード長 1,283 bytes
コンパイル時間 11,546 ms
コンパイル使用メモリ 427,780 KB
実行使用メモリ 57,228 KB
最終ジャッジ日時 2024-04-30 19:30:53
合計ジャッジ時間 19,488 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 273 ms
57,228 KB
testcase_01 AC 287 ms
57,156 KB
testcase_02 AC 276 ms
57,000 KB
testcase_03 AC 267 ms
57,104 KB
testcase_04 AC 264 ms
56,976 KB
testcase_05 AC 267 ms
56,968 KB
testcase_06 AC 266 ms
57,084 KB
testcase_07 AC 264 ms
57,096 KB
testcase_08 AC 267 ms
57,108 KB
testcase_09 AC 269 ms
57,172 KB
testcase_10 AC 268 ms
57,024 KB
testcase_11 AC 272 ms
57,064 KB
testcase_12 AC 264 ms
57,112 KB
testcase_13 AC 269 ms
57,100 KB
testcase_14 AC 271 ms
56,964 KB
testcase_15 AC 261 ms
56,964 KB
testcase_16 AC 265 ms
56,960 KB
testcase_17 AC 269 ms
57,080 KB
testcase_18 AC 262 ms
56,988 KB
testcase_19 AC 267 ms
57,080 KB
testcase_20 AC 270 ms
57,128 KB
testcase_21 AC 263 ms
56,992 KB
testcase_22 AC 264 ms
57,132 KB
testcase_23 AC 269 ms
57,000 KB
testcase_24 AC 265 ms
57,056 KB
testcase_25 AC 268 ms
57,076 KB
testcase_26 AC 266 ms
57,060 KB
testcase_27 AC 283 ms
57,104 KB
testcase_28 AC 269 ms
57,080 KB
testcase_29 AC 268 ms
56,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

fun main(args: Array<String>) {
    fun readLineLongArray(): List<Long> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toLong() }
        return ret
    }

    fun readLineLong(): Long {
        val str = readLine() as String
        return str.toLong()
    }

    fun readLineInt(): Int {
        val str = readLine() as String
        return str.toInt()
    }

    fun readLineIntArray() : List<Int> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toInt() }
        return ret
    }

    fun readLineDoubleArray(): List<Double> {
        val str = readLine() as String
        val arrStr = str.split(" ")
        val ret = arrStr.map { it.toDouble() }
        return ret
    }

    fun readLineDouble() : Double {
        val str = readLine() as String
        return str.toDouble()
    }

    fun readLineString() : String {
        return readLine() as String
    }

    //    fun readLineStringArray(): List<String> {
    //        val str = readLine() as String
    //        val arrStr = str.split(" ")
    //        return arrStr
    //    }
    val da = readLineDoubleArray()
    val r = da[0]
    val d = da[1]
    println(Math.sqrt(d*d-r*r))


}
0