結果

問題 No.1229 ラグビーの得点パターン
ユーザー rutilicusrutilicus
提出日時 2020-09-19 21:18:43
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 296 ms / 2,000 ms
コード長 425 bytes
コンパイル時間 13,216 ms
コンパイル使用メモリ 420,804 KB
実行使用メモリ 52,928 KB
最終ジャッジ日時 2023-09-05 23:38:32
合計ジャッジ時間 23,411 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 287 ms
52,684 KB
testcase_01 AC 284 ms
52,656 KB
testcase_02 AC 286 ms
52,700 KB
testcase_03 AC 287 ms
52,776 KB
testcase_04 AC 286 ms
52,744 KB
testcase_05 AC 288 ms
52,728 KB
testcase_06 AC 283 ms
52,716 KB
testcase_07 AC 287 ms
52,816 KB
testcase_08 AC 285 ms
52,644 KB
testcase_09 AC 287 ms
52,660 KB
testcase_10 AC 296 ms
52,736 KB
testcase_11 AC 290 ms
52,648 KB
testcase_12 AC 294 ms
52,636 KB
testcase_13 AC 288 ms
52,832 KB
testcase_14 AC 290 ms
52,660 KB
testcase_15 AC 288 ms
52,828 KB
testcase_16 AC 287 ms
52,696 KB
testcase_17 AC 289 ms
52,564 KB
testcase_18 AC 290 ms
52,744 KB
testcase_19 AC 294 ms
52,708 KB
testcase_20 AC 293 ms
52,928 KB
testcase_21 AC 294 ms
52,648 KB
testcase_22 AC 292 ms
52,828 KB
testcase_23 AC 293 ms
52,648 KB
testcase_24 AC 286 ms
52,820 KB
testcase_25 AC 286 ms
52,692 KB
testcase_26 AC 288 ms
52,604 KB
testcase_27 AC 286 ms
52,656 KB
testcase_28 AC 288 ms
52,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:18: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(ans)
            ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val n = readInputLine().toInt()

    var ans = 0

    for (p in 0..100) {
        for (t in 0..100) {
            for (g in 0..t) {
                if (p * 3 + t * 5 + g * 2 == n) {
                    ans++
                }
            }
        }
    }

    builder.appendln(ans)

    print(builder.toString())
}

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