結果

問題 No.1198 お菓子配り-1
ユーザー rutilicusrutilicus
提出日時 2021-02-11 18:59:35
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 282 ms / 2,000 ms
コード長 368 bytes
コンパイル時間 12,766 ms
コンパイル使用メモリ 409,968 KB
実行使用メモリ 53,076 KB
最終ジャッジ日時 2023-09-25 08:41:42
合計ジャッジ時間 18,972 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 274 ms
52,768 KB
testcase_01 AC 274 ms
53,076 KB
testcase_02 AC 267 ms
52,820 KB
testcase_03 AC 272 ms
52,808 KB
testcase_04 AC 282 ms
52,976 KB
testcase_05 AC 272 ms
52,844 KB
testcase_06 AC 271 ms
52,760 KB
testcase_07 AC 275 ms
52,668 KB
testcase_08 AC 275 ms
52,700 KB
testcase_09 AC 267 ms
52,860 KB
testcase_10 AC 273 ms
52,748 KB
testcase_11 AC 275 ms
52,812 KB
testcase_12 AC 273 ms
52,860 KB
testcase_13 AC 269 ms
52,848 KB
testcase_14 AC 271 ms
52,840 KB
testcase_15 AC 277 ms
52,708 KB
testcase_16 AC 262 ms
50,256 KB
testcase_17 AC 260 ms
50,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val n = readInputLine()

    builder.appendLine(
        when (n) {
            "1" -> -1
            "4" -> -1
            else -> {
                if (n.takeLast(2).toInt() % 4 == 2) -1 else 1
            }
        }
    )

    print(builder.toString())
}

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