結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー ichibanshibori
提出日時 2018-05-02 19:20:45
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 320 ms / 1,000 ms
コード長 293 bytes
コンパイル時間 11,510 ms
コンパイル使用メモリ 429,052 KB
実行使用メモリ 57,044 KB
最終ジャッジ日時 2024-11-20 15:53:33
合計ジャッジ時間 22,432 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args : Array<String>) {
         ^

ソースコード

diff #

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

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