結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー kota
提出日時 2022-05-18 11:28:12
言語 Kotlin
(2.1.0)
結果
AC  
実行時間 297 ms / 5,000 ms
コード長 323 bytes
コンパイル時間 11,193 ms
コンパイル使用メモリ 424,468 KB
実行使用メモリ 49,900 KB
最終ジャッジ日時 2024-09-16 12:24:26
合計ジャッジ時間 13,138 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

fun main() {
    val n = readLine()!!.toInt()

    for (i in 1..n) {
        if (i % 3 == 0 && i % 5 == 0) {
            println("FizzBuzz")
        } else if (i % 3 == 0) {
            println("Fizz")   
        } else if (i % 5 == 0) {
            println("Buzz")
        } else {
            println(i)
        }
    }
}
0