結果

問題 No.172 UFOを捕まえろ
ユーザー javyjavy
提出日時 2015-11-28 01:40:06
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 283 ms / 5,000 ms
コード長 1,048 bytes
コンパイル時間 12,937 ms
コンパイル使用メモリ 418,928 KB
実行使用メモリ 53,348 KB
最終ジャッジ日時 2023-08-12 15:54:28
合計ジャッジ時間 18,959 ms
ジャッジサーバーID
(参考情報)
judge2 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 264 ms
52,944 KB
testcase_01 AC 260 ms
52,644 KB
testcase_02 AC 283 ms
52,920 KB
testcase_03 AC 266 ms
52,668 KB
testcase_04 AC 253 ms
52,932 KB
testcase_05 AC 261 ms
52,852 KB
testcase_06 AC 264 ms
53,348 KB
testcase_07 AC 261 ms
52,752 KB
testcase_08 AC 279 ms
52,676 KB
testcase_09 AC 269 ms
52,664 KB
testcase_10 AC 276 ms
52,768 KB
testcase_11 AC 273 ms
52,660 KB
testcase_12 AC 263 ms
52,664 KB
testcase_13 AC 275 ms
53,040 KB
testcase_14 AC 249 ms
52,624 KB
testcase_15 AC 250 ms
52,596 KB
testcase_16 AC 254 ms
52,720 KB
testcase_17 AC 255 ms
53,040 KB
testcase_18 AC 257 ms
53,036 KB
testcase_19 AC 249 ms
52,676 KB
testcase_20 AC 255 ms
52,720 KB
testcase_21 AC 265 ms
52,900 KB
testcase_22 AC 253 ms
52,664 KB
testcase_23 AC 250 ms
52,844 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package Yukicoder

/**
 * Created by hichikawa on 2015/11/12.
 */
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
    }

    val input = readLineIntArray()
    val len = Math.ceil(Math.abs(input[0]) + Math.abs(input[1]) + Math.abs(input[2]) * Math.sqrt(2.toDouble())).toLong()

    println(len)
}
0