結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー fuadul hasanfuadul hasan
提出日時 2020-05-20 21:36:39
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 938 bytes
コンパイル時間 1,393 ms
コンパイル使用メモリ 163,736 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-09 23:07:12
合計ジャッジ時間 1,856 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

//Author: Fuadul Hasan(fuadul202@gmail.com)
//BSMRSTU,Gopalganj
#include<bits/stdc++.h>
using namespace std;int tc = 1;
#define happy ios::sync_with_stdio(false);
#define coding  cin.tie(0);
#define pb  push_back
#define mp make_pair
#define ll long long
#define pr pair<int, int> 
#define vpr vector<pr> 
#define vi std::vector<int>
#define vll std::vector<ll>
#define all(n) n.begin(),n.end()
#define Test printf("Case %d: ",tc++);
#define YES printf("YES\n");
#define NO printf("NO\n");
#define Yes printf("Yes\n");
#define No printf("No\n");
const int mod = 1e9 + 7;
const ll  Inf = (ll)2e18 + 5;
const int N   = 1e6 + 5;
int vis[N];

int solve() 
{
	//happy coding

	int n;
	cin>>n;
	ll sum = 0;
	for(int i=1;i<=n;i++){
		if(i%3==0){
			cout<<"Fizz"<<endl;
		}else if(i%5==0){
			cout<<"Buzz"<<endl;
		}else{
			cout<<i<<endl;
		}
	}

	return 0;
}
int main(){
	int test = 1;
	//scanf("%d", &test);
	while (test--)solve();return 0;
}
0