結果

問題 No.207 世界のなんとか
ユーザー rutilicusrutilicus
提出日時 2020-08-30 21:08:40
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 316 ms / 5,000 ms
コード長 328 bytes
コンパイル時間 11,713 ms
コンパイル使用メモリ 429,200 KB
実行使用メモリ 57,064 KB
最終ジャッジ日時 2024-04-27 13:19:04
合計ジャッジ時間 19,001 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
56,808 KB
testcase_01 AC 314 ms
56,852 KB
testcase_02 AC 307 ms
56,844 KB
testcase_03 AC 306 ms
56,812 KB
testcase_04 AC 308 ms
56,952 KB
testcase_05 AC 313 ms
56,892 KB
testcase_06 AC 308 ms
56,984 KB
testcase_07 AC 308 ms
56,808 KB
testcase_08 AC 304 ms
56,892 KB
testcase_09 AC 312 ms
56,924 KB
testcase_10 AC 312 ms
56,780 KB
testcase_11 AC 312 ms
56,824 KB
testcase_12 AC 308 ms
56,768 KB
testcase_13 AC 311 ms
56,784 KB
testcase_14 AC 315 ms
56,904 KB
testcase_15 AC 313 ms
56,832 KB
testcase_16 AC 311 ms
57,064 KB
testcase_17 AC 316 ms
56,812 KB
testcase_18 AC 314 ms
56,916 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:8:21: 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(i)
                    ^

ソースコード

diff #

fun main() {
    val builder = StringBuilder()

    val (a, b) = readInputLine().split(" ").map { it.toInt() }

    for (i in a..b) {
        if (i % 3 == 0 || i.toString().contains('3')) {
            builder.appendln(i)
        }
    }

    print(builder.toString())
}

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