結果

問題 No.264 じゃんけん
ユーザー rutilicusrutilicus
提出日時 2020-08-30 21:06:10
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 284 ms / 5,000 ms
コード長 349 bytes
コンパイル時間 11,316 ms
コンパイル使用メモリ 435,592 KB
実行使用メモリ 57,048 KB
最終ジャッジ日時 2024-04-27 13:18:45
合計ジャッジ時間 12,807 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
56,840 KB
testcase_01 AC 274 ms
56,808 KB
testcase_02 AC 274 ms
57,048 KB
testcase_03 AC 265 ms
56,872 KB
testcase_04 AC 277 ms
56,952 KB
testcase_05 AC 270 ms
56,880 KB
testcase_06 AC 263 ms
56,828 KB
testcase_07 AC 268 ms
56,984 KB
testcase_08 AC 261 ms
56,992 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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