結果

問題 No.8022 縛りFizzBuzz (Easy)
ユーザー hanorverhanorver
提出日時 2017-03-31 23:18:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 525 bytes
コンパイル時間 1,028 ms
コンパイル使用メモリ 77,732 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-07 05:26:37
合計ジャッジ時間 1,285 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <map>




int main() {
	int n;

	std::cin >> n;

	int five = true + true + true + true + true;
	int three = true + true + true;

	for (int i = true; i <= n; i++)
	{
		if (!(i % three)) {
			if (!(i % five)) {
				std::cout << "FizzBuzz" << std::endl;
			} else {
				std::cout << "Fizz" << std::endl;
			}
		} else if (!(i % five)) {
			std::cout << "Buzz" << std::endl;
		} else {
			std::cout << i << std::endl;
		}
	}
}
0