結果

問題 No.637 X: Yet Another FizzBuzz Problem
ユーザー ichibanshiboriichibanshibori
提出日時 2018-05-02 19:20:45
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 324 ms / 1,000 ms
コード長 293 bytes
コンパイル時間 11,376 ms
コンパイル使用メモリ 433,924 KB
実行使用メモリ 57,076 KB
最終ジャッジ日時 2024-04-30 18:27:42
合計ジャッジ時間 22,828 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 320 ms
56,924 KB
testcase_01 AC 314 ms
56,948 KB
testcase_02 AC 319 ms
56,932 KB
testcase_03 AC 319 ms
56,920 KB
testcase_04 AC 322 ms
56,936 KB
testcase_05 AC 322 ms
56,920 KB
testcase_06 AC 314 ms
56,920 KB
testcase_07 AC 319 ms
56,908 KB
testcase_08 AC 320 ms
56,848 KB
testcase_09 AC 317 ms
56,852 KB
testcase_10 AC 318 ms
56,888 KB
testcase_11 AC 313 ms
56,972 KB
testcase_12 AC 310 ms
56,848 KB
testcase_13 AC 318 ms
56,820 KB
testcase_14 AC 314 ms
56,952 KB
testcase_15 AC 316 ms
56,832 KB
testcase_16 AC 315 ms
57,076 KB
testcase_17 AC 314 ms
56,856 KB
testcase_18 AC 315 ms
56,956 KB
testcase_19 AC 317 ms
56,968 KB
testcase_20 AC 318 ms
56,956 KB
testcase_21 AC 318 ms
56,916 KB
testcase_22 AC 318 ms
56,924 KB
testcase_23 AC 316 ms
56,844 KB
testcase_24 AC 318 ms
56,840 KB
testcase_25 AC 316 ms
56,920 KB
testcase_26 AC 316 ms
56,824 KB
testcase_27 AC 322 ms
56,972 KB
testcase_28 AC 324 ms
56,920 KB
testcase_29 AC 315 ms
56,820 KB
testcase_30 AC 316 ms
56,968 KB
testcase_31 AC 318 ms
56,796 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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