結果

問題 No.296 n度寝
コンテスト
ユーザー rutilicus
提出日時 2020-08-30 22:07:08
言語 Kotlin
(2.3.20)
コンパイル:
kotlinc _filename_ -include-runtime -d main.jar
実行:
kotlin main.jar
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 318 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,117 ms
コンパイル使用メモリ 429,336 KB
最終ジャッジ日時 2026-05-10 13:10:19
合計ジャッジ時間 7,805 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
Main.kt:8:13: error: 'fun StringBuilder.appendln(value: Int): 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: error: 'fun StringBuilder.appendln(value: Int): 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 #
raw source code

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