結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー UMRgurashiUMRgurashi
提出日時 2022-07-25 22:01:50
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 464 bytes
コンパイル時間 2,304 ms
コンパイル使用メモリ 197,556 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-22 08:27:24
合計ジャッジ時間 4,063 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
#define int long long
using namespace std;
int ini() { int x; cin >> x; return x; }

int i,a,b,c;
void solve() {
    i++;
    a++,a++,a++;
    b++,b++,b++,b++,b++;
	int N = ini();
	for(;i<=N;i++){
		if (i % a == c)cout << "Fizz";
		if (i % b == c)cout << "Buzz";
		if (i % a != c && i % b != c)cout << i;
		cout << endl;
	}
}

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout << fixed << setprecision(15);
	solve();
}
0