結果

問題 No.264 じゃんけん
ユーザー rutilicusrutilicus
提出日時 2020-08-30 21:05:23
言語 Kotlin
(1.9.23)
結果
WA  
実行時間 -
コード長 349 bytes
コンパイル時間 9,409 ms
コンパイル使用メモリ 437,064 KB
実行使用メモリ 57,184 KB
最終ジャッジ日時 2024-04-27 13:18:29
合計ジャッジ時間 12,887 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
57,060 KB
testcase_01 AC 272 ms
56,844 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 268 ms
56,872 KB
testcase_05 AC 262 ms
56,872 KB
testcase_06 AC 267 ms
56,796 KB
testcase_07 WA -
testcase_08 AC 270 ms
56,832 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 -> "Lose"
        }
    )

    print(builder.toString())
}

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