package main import ( "bufio" "fmt" "os" "strconv" ) func main() { num := nextInt() for i := 1; i <= num; i++ { fmt.Println(fizzBuzz(i)) } } func fizzBuzz(n int) string { result := "" if n%3 == 0 { result = "Fizz" } if n%5 == 0 { result += "Buzz" } if result == "" { result = strconv.Itoa(n) } return result } var sc = bufio.NewScanner(os.Stdin) func next() string { sc.Split(bufio.ScanWords) sc.Scan() return sc.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i }