結果

問題 No.172 UFOを捕まえろ
ユーザー rutilicusrutilicus
提出日時 2021-02-13 16:25:18
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 272 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 14,347 ms
コンパイル使用メモリ 415,636 KB
実行使用メモリ 54,720 KB
最終ジャッジ日時 2023-09-28 00:54:56
合計ジャッジ時間 22,164 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 257 ms
54,720 KB
testcase_01 AC 266 ms
52,736 KB
testcase_02 AC 259 ms
52,968 KB
testcase_03 AC 265 ms
52,820 KB
testcase_04 AC 263 ms
52,668 KB
testcase_05 AC 262 ms
52,444 KB
testcase_06 AC 272 ms
53,072 KB
testcase_07 AC 264 ms
52,964 KB
testcase_08 AC 259 ms
52,996 KB
testcase_09 AC 266 ms
52,848 KB
testcase_10 AC 255 ms
52,764 KB
testcase_11 AC 259 ms
52,700 KB
testcase_12 AC 260 ms
52,672 KB
testcase_13 AC 261 ms
53,024 KB
testcase_14 AC 263 ms
52,704 KB
testcase_15 AC 261 ms
54,556 KB
testcase_16 AC 261 ms
52,604 KB
testcase_17 AC 261 ms
52,708 KB
testcase_18 AC 257 ms
52,576 KB
testcase_19 AC 262 ms
52,756 KB
testcase_20 AC 259 ms
52,640 KB
testcase_21 AC 259 ms
52,632 KB
testcase_22 AC 261 ms
52,684 KB
testcase_23 AC 267 ms
52,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import kotlin.math.abs
import kotlin.math.ceil
import kotlin.math.sqrt

fun main() {
    val builder = StringBuilder()

    val (x, y, r) = readInputLine().split(" ").map { it.toInt() }

    // 何も分からんから競プロ向いてない
    builder.appendLine((abs(x) + abs(y) + ceil(sqrt(2.0) * r.toDouble())).toLong())

    print(builder.toString())
}

fun readInputLine(): String {
    return readLine()!!
}
0