結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー Pump0129Pump0129
提出日時 2018-04-10 19:23:49
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 302 ms / 1,000 ms
コード長 402 bytes
コンパイル時間 12,265 ms
コンパイル使用メモリ 415,372 KB
実行使用メモリ 53,100 KB
最終ジャッジ日時 2023-08-12 23:25:31
合計ジャッジ時間 23,659 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
52,828 KB
testcase_01 AC 301 ms
53,048 KB
testcase_02 AC 287 ms
53,000 KB
testcase_03 AC 286 ms
52,996 KB
testcase_04 AC 289 ms
52,892 KB
testcase_05 AC 294 ms
52,788 KB
testcase_06 AC 298 ms
53,040 KB
testcase_07 AC 296 ms
53,052 KB
testcase_08 AC 283 ms
52,948 KB
testcase_09 AC 299 ms
53,008 KB
testcase_10 AC 298 ms
52,832 KB
testcase_11 AC 302 ms
52,816 KB
testcase_12 AC 299 ms
52,844 KB
testcase_13 AC 290 ms
53,100 KB
testcase_14 AC 296 ms
52,992 KB
testcase_15 AC 298 ms
53,068 KB
testcase_16 AC 291 ms
52,880 KB
testcase_17 AC 283 ms
53,000 KB
testcase_18 AC 285 ms
52,868 KB
testcase_19 AC 291 ms
52,944 KB
testcase_20 AC 293 ms
52,776 KB
testcase_21 AC 295 ms
53,072 KB
testcase_22 AC 287 ms
52,844 KB
testcase_23 AC 295 ms
52,860 KB
testcase_24 AC 294 ms
52,972 KB
testcase_25 AC 296 ms
52,924 KB
testcase_26 AC 288 ms
53,008 KB
testcase_27 AC 284 ms
52,992 KB
testcase_28 AC 289 ms
52,932 KB
testcase_29 AC 294 ms
53,004 KB
testcase_30 AC 294 ms
52,832 KB
testcase_31 AC 297 ms
53,036 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

package net.ipipip0129.kotlin.yukicoder

fun main(args: Array<String>) {
    val list = readLine()!!.split(" ").map { it.toInt() }

    var count = 0

    list.forEach {
        count += if (it % 5 == 0 && it % 3 == 0) {
            8
        } else if (it % 5 == 0|| it % 3 == 0) {
            4
        } else {
            it.toString().length
        }
    }

    println(count)
}
0