結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー n4sh
提出日時 2025-02-05 00:02:02
言語 JavaScript
(node v23.5.0)
結果
AC  
実行時間 79 ms / 5,000 ms
コード長 740 bytes
コンパイル時間 636 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 42,368 KB
最終ジャッジ日時 2025-02-05 00:02:07
合計ジャッジ時間 2,076 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

function Main(input) {
	// input = input.split("\n");
	// tmp = input[0].split(" ");
	
	const num = parseInt(input, 10);
	// const b = parseInt(tmp[0], 10);
	// const c = parseInt(tmp[1], 10);
	// const s = input[2];

    for(let i = 1; i <= num; i++) {


        if(i % 15 === 0) {
            console.log("FizzBuzz");
        } else if (i % 5 === 0) {
            console.log("Buzz");
            
        } else if (i % 3 === 0) {
            console.log("Fizz");
            
        } else {
            console.log(i);

        }
    }

	//出力
	
}
//*この行以降は編集しないでください(標準入出力から一度に読み込み、Mainを呼び出します)
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
0