結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー fmhrfmhr
提出日時 2017-03-31 22:34:26
言語 Go
(1.22.1)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 9,763 ms
コンパイル使用メモリ 209,568 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-21 10:56:28
合計ジャッジ時間 10,685 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import "fmt"

const (
	a = iota
	b
	c
	d
	e
	f
	g
	h
	i
	j
)

func main() {
	var N int
	fmt.Scan(&N)
	for i := b; i < N+1; i++ {
		if i%d == a && i%f == a {
			fmt.Println("FizzBuzz")
		} else if i%d == a {
			fmt.Println("Fizz")
		} else if i%f == a {
			fmt.Println("Buzz")
		} else {
			fmt.Println(i)
		}
	}
}
0