結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー 💕💖💞💕💖💞
提出日時 2018-02-15 21:23:18
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 318 ms / 1,000 ms
コード長 296 bytes
コンパイル時間 12,784 ms
コンパイル使用メモリ 431,148 KB
実行使用メモリ 57,064 KB
最終ジャッジ日時 2024-04-30 16:51:00
合計ジャッジ時間 19,737 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
56,908 KB
testcase_01 AC 266 ms
56,820 KB
testcase_02 AC 260 ms
56,920 KB
testcase_03 AC 268 ms
56,696 KB
testcase_04 AC 256 ms
56,944 KB
testcase_05 AC 262 ms
56,964 KB
testcase_06 AC 257 ms
56,824 KB
testcase_07 AC 268 ms
57,000 KB
testcase_08 AC 265 ms
56,964 KB
testcase_09 AC 262 ms
56,960 KB
testcase_10 AC 318 ms
56,824 KB
testcase_11 AC 256 ms
56,964 KB
testcase_12 AC 261 ms
56,984 KB
testcase_13 AC 265 ms
56,928 KB
testcase_14 AC 268 ms
56,836 KB
testcase_15 AC 264 ms
56,932 KB
testcase_16 AC 259 ms
56,868 KB
testcase_17 AC 267 ms
56,960 KB
testcase_18 AC 258 ms
57,064 KB
testcase_19 AC 264 ms
56,824 KB
testcase_20 AC 259 ms
56,820 KB
testcase_21 AC 266 ms
56,992 KB
testcase_22 AC 263 ms
56,792 KB
testcase_23 AC 265 ms
56,860 KB
testcase_24 AC 272 ms
56,920 KB
testcase_25 AC 264 ms
56,948 KB
testcase_26 AC 267 ms
56,928 KB
testcase_27 AC 264 ms
56,800 KB
testcase_28 AC 276 ms
56,924 KB
testcase_29 AC 263 ms
56,904 KB
testcase_30 AC 261 ms
56,968 KB
testcase_31 AC 260 ms
56,836 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