結果

問題 No.296 n度寝
ユーザー rutilicus
提出日時 2020-08-30 22:07:08
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 327 ms / 1,000 ms
コード長 318 bytes
コンパイル時間 13,182 ms
コンパイル使用メモリ 437,180 KB
実行使用メモリ 52,044 KB
最終ジャッジ日時 2024-11-15 15:39:48
合計ジャッジ時間 18,332 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
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