結果
問題 |
No.8022 縛りFizzBuzz (Easy)
|
ユーザー |
|
提出日時 | 2017-03-31 22:42:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 611 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 73,112 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 05:00:18 |
合計ジャッジ時間 | 1,210 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 4 |
ソースコード
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<stack> #include<queue> #include<vector> typedef long long int ll; using namespace std; int N,a,b; int zero; #define EREP(i,n) for (int i=(zero);i<=(n);i++) int main(){ ios_base::sync_with_stdio(false); cin>>N; a++; a++; a++; b++; b++; b++; b++; b++; EREP(i,N){ if(!(i%a)&&(i%b))cout<<"Fizz"<<endl; if(!(i%b)&&(i%a))cout<<"Buzz"<<endl; if(!(i%b)&&!(i%a))cout<<"FizzBuzz"<<endl; if((i%a)&&(i%b))cout<<i<<endl; } }