結果

問題 No.1223 I hate Golf
ユーザー rutilicusrutilicus
提出日時 2020-09-12 10:47:01
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 296 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 14,334 ms
コンパイル使用メモリ 422,276 KB
実行使用メモリ 53,232 KB
最終ジャッジ日時 2023-08-30 03:22:43
合計ジャッジ時間 20,978 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 294 ms
52,964 KB
testcase_01 AC 294 ms
53,176 KB
testcase_02 AC 292 ms
53,052 KB
testcase_03 AC 295 ms
53,012 KB
testcase_04 AC 290 ms
53,116 KB
testcase_05 AC 293 ms
53,092 KB
testcase_06 AC 294 ms
53,040 KB
testcase_07 AC 296 ms
53,144 KB
testcase_08 AC 292 ms
53,040 KB
testcase_09 AC 292 ms
53,176 KB
testcase_10 AC 295 ms
53,124 KB
testcase_11 AC 295 ms
53,216 KB
testcase_12 AC 291 ms
53,028 KB
testcase_13 AC 290 ms
53,032 KB
testcase_14 AC 290 ms
53,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:8:13: warning: 'appendln(String?): kotlin.text.StringBuilder /* = java.lang.StringBuilder */' is deprecated. Use appendLine instead. Note that the new method always appends the line feed character '\n' regardless of the system line separator.
    builder.appendln(if ((abs(n) + k - 1L) / k <= t) "Yes" else "No")
            ^

ソースコード

diff #

import kotlin.math.abs

fun main() {
    val builder = StringBuilder()

    val (n, k, t) = readInputLine().split(" ").map { it.toLong() }

    builder.appendln(if ((abs(n) + k - 1L) / k <= t) "Yes" else "No")

    print(builder.toString())
}

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