function Main(input) { var num = Number(input) var fb = "" var line = "" for (i = 1; i < num; i++) { line = "" if (i % 3 === 0) line += "Fizz" if (i % 5 === 0) line += "Buzz" if (!line) line += i line += "\n" fb += line } console.log(fb.trim()) } Main(require("fs").readFileSync("/dev/stdin", "utf8"))