結果

問題 No.264 じゃんけん
ユーザー rutilicus
提出日時 2020-08-30 21:06:10
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 286 ms / 5,000 ms
コード長 349 bytes
コンパイル時間 10,684 ms
コンパイル使用メモリ 430,284 KB
実行使用メモリ 56,928 KB
最終ジャッジ日時 2024-11-15 15:27:40
合計ジャッジ時間 13,493 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:6: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(
            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

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

    builder.appendln(
        when {
            n == k -> "Drew"
            (n + 1) % 3 == k -> "Won"
            else -> "Lost"
        }
    )

    print(builder.toString())
}

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