結果

問題 No.207 世界のなんとか
ユーザー da_louisda_louis
提出日時 2020-02-07 00:24:56
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 318 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 13,886 ms
コンパイル使用メモリ 445,440 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2023-10-25 22:51:23
合計ジャッジ時間 18,658 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 313 ms
54,400 KB
testcase_01 AC 310 ms
54,412 KB
testcase_02 AC 311 ms
54,396 KB
testcase_03 AC 308 ms
54,400 KB
testcase_04 AC 308 ms
54,396 KB
testcase_05 AC 306 ms
54,416 KB
testcase_06 AC 306 ms
54,396 KB
testcase_07 AC 308 ms
54,412 KB
testcase_08 AC 298 ms
54,408 KB
testcase_09 AC 301 ms
54,404 KB
testcase_10 AC 318 ms
54,408 KB
testcase_11 AC 311 ms
54,416 KB
testcase_12 AC 309 ms
54,408 KB
testcase_13 AC 309 ms
54,400 KB
testcase_14 AC 309 ms
54,392 KB
testcase_15 AC 305 ms
54,400 KB
testcase_16 AC 297 ms
54,404 KB
testcase_17 AC 293 ms
54,408 KB
testcase_18 AC 286 ms
54,400 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:11:63: warning: 'appendln(Long): 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.
        if (i % 3 == 0L || i.toString().contains('3')) answer.appendln(i)
                                                              ^

ソースコード

diff #

fun main(args: Array<String>) {
    p560()
}

fun p560() {
    val (a, b) = readLine()!!.split(' ').map { it.toLong() }

    val answer = StringBuilder()

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

    print(answer)
}
0