結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー mmn15277198mmn15277198
提出日時 2020-06-21 12:42:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 719 bytes
コンパイル時間 779 ms
コンパイル使用メモリ 91,424 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-16 18:16:16
合計ジャッジ時間 2,016 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>

const long long INF = 1e6+7;
const long long MOD = 1e9+7;
const double PI=acos(-1);

using namespace std;

int main(){
	
	string temp="a";
	const int one=temp.size();
	temp+='a';
	temp+='a';
	const int three=temp.size();
	temp+='a';
	temp+='a';
	const int five=temp.size();
	
	int n;
	cin >> n;
	for(int i=one;i<=n;i++){
		if(i%five==0 && i%three==0){
			cout << "FizzBuzz" << endl;
			continue;
		}
		if(i%five==0){
			cout << "Buzz" << endl;
			continue;
		}
		if(i%three==0){
			cout << "Fizz" << endl;
			continue;
		}
		cout << i << endl;
	}
	return 0;
}
0