結果

問題 No.172 UFOを捕まえろ
ユーザー rutilicus
提出日時 2021-02-13 16:25:18
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 284 ms / 5,000 ms
コード長 417 bytes
コンパイル時間 10,074 ms
コンパイル使用メモリ 430,788 KB
実行使用メモリ 51,804 KB
最終ジャッジ日時 2024-07-20 19:27:36
合計ジャッジ時間 17,848 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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