結果

問題 No.637 X: Yet Another FizzBuzz Problem
コンテスト
ユーザー Pump0129
提出日時 2018-04-10 19:23:49
言語 Kotlin
(2.4.10 + ACL)
コンパイル:
kotlinc -cp /opt/aclib/ac_library.jar _filename_ -include-runtime -d main.jar
実行:
java -cp main.jar:/opt/aclib/ac_library.jar _class_
結果
AC  
実行時間 89 ms / 1,000 ms
+ 229µs
コード長 402 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 7,819 ms
コンパイル使用メモリ 502,008 KB
実行使用メモリ 46,480 KB
最終ジャッジ日時 2026-09-27 02:19:59
合計ジャッジ時間 11,714 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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