結果

問題 No.296 n度寝
ユーザー rutilicusrutilicus
提出日時 2020-08-30 22:07:08
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 301 ms / 1,000 ms
コード長 318 bytes
コンパイル時間 11,479 ms
コンパイル使用メモリ 430,644 KB
実行使用メモリ 57,044 KB
最終ジャッジ日時 2024-04-27 13:30:30
合計ジャッジ時間 16,343 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 285 ms
56,880 KB
testcase_01 AC 289 ms
56,832 KB
testcase_02 AC 283 ms
56,960 KB
testcase_03 AC 301 ms
56,832 KB
testcase_04 AC 288 ms
56,824 KB
testcase_05 AC 290 ms
56,864 KB
testcase_06 AC 291 ms
57,044 KB
testcase_07 AC 289 ms
56,944 KB
testcase_08 AC 292 ms
56,864 KB
testcase_09 AC 286 ms
56,956 KB
testcase_10 AC 286 ms
56,880 KB
testcase_11 AC 295 ms
56,760 KB
testcase_12 AC 285 ms
57,032 KB
testcase_13 AC 285 ms
56,908 KB
testcase_14 AC 287 ms
56,864 KB
testcase_15 AC 297 ms
56,940 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:8:13: warning: 'appendln(Int): 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(time / 60 % 24)
            ^
Main.kt:9:13: warning: 'appendln(Int): 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(time % 60)
            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val (n, h, m, t) = readInputLine().split(" ").map { it.toInt() }

    val time = h * 60 + m + t * (n - 1)

    builder.appendln(time / 60 % 24)
    builder.appendln(time % 60)

    print(builder.toString())
}

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