結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー 💕💖💞💕💖💞
提出日時 2018-02-15 21:23:18
言語 Kotlin
(1.9.10)
結果
AC  
実行時間 301 ms / 1,000 ms
コード長 296 bytes
コンパイル時間 14,257 ms
コンパイル使用メモリ 422,464 KB
実行使用メモリ 53,056 KB
最終ジャッジ日時 2023-08-12 21:48:18
合計ジャッジ時間 23,891 ms
ジャッジサーバーID
(参考情報)
judge14 / judge7
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 291 ms
53,020 KB
testcase_01 AC 285 ms
52,832 KB
testcase_02 AC 276 ms
52,888 KB
testcase_03 AC 283 ms
52,680 KB
testcase_04 AC 281 ms
53,056 KB
testcase_05 AC 283 ms
52,640 KB
testcase_06 AC 286 ms
52,680 KB
testcase_07 AC 273 ms
52,864 KB
testcase_08 AC 275 ms
52,776 KB
testcase_09 AC 268 ms
52,792 KB
testcase_10 AC 271 ms
53,048 KB
testcase_11 AC 268 ms
52,864 KB
testcase_12 AC 271 ms
52,952 KB
testcase_13 AC 295 ms
52,904 KB
testcase_14 AC 271 ms
52,904 KB
testcase_15 AC 276 ms
52,776 KB
testcase_16 AC 271 ms
52,788 KB
testcase_17 AC 272 ms
52,692 KB
testcase_18 AC 268 ms
53,048 KB
testcase_19 AC 268 ms
52,948 KB
testcase_20 AC 301 ms
52,856 KB
testcase_21 AC 272 ms
52,896 KB
testcase_22 AC 268 ms
52,664 KB
testcase_23 AC 278 ms
52,732 KB
testcase_24 AC 269 ms
52,832 KB
testcase_25 AC 274 ms
52,824 KB
testcase_26 AC 267 ms
52,672 KB
testcase_27 AC 269 ms
53,004 KB
testcase_28 AC 270 ms
52,792 KB
testcase_29 AC 271 ms
53,052 KB
testcase_30 AC 267 ms
52,972 KB
testcase_31 AC 271 ms
53,020 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

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

  bs.map {
    when { 
      it%3 == 0 && it%5 == 0 -> "FizzBuzz".length
      it%3 == 0 -> "Fizz".length
      it%5 == 0 -> "Buzz".length
      else -> it.toString().length
    }
  }.sum().let{ println(it) }
}
0