Language: C++

#include"bits/stdc++.h"
#define N 10000
using namespace std;
int main() {
	int a[N] , b[N], m, n, j = 1,hideo=1;
	char str[10];
	char  str1[10] = { "Fizz" }, str2[10] = { "Buzz" }, str3[10] = { "FizzBuzz" };
	memset(a, 1, sizeof(a));
	while (1) {
		cin >> m >> n;
		if (m == 0 && n == 0)return 0;
		for (int i = 0; i <= m; i++)a[i] = 1;
		for (int i = 1; i <= n; i++) {
			if (hideo == m - 2)goto ruio;
			if (j > m)j = 1;
			//cout << a[j] << endl;
			if (a[j] == 1) {
				memset(str, NULL, sizeof(str));
				cin >> str;
				if (strcmp(str, str1) == 0) {
					if (i % 3 == 0 && i % 5 != 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}
				}
				else if (strcmp(str, str2) == 0) {
					if (i % 3 != 0 && i % 5 == 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}
				}
				else if (strcmp(str, str3) == 0) {
					if (i % 3 == 0 && i % 5 == 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}

				}
				else {
					char *s = str;
					int len;
					len = atoi(str);
					if (len % 3 == 0 || len % 5 == 0)a[j] = -1;
				}
			hell:;
				j++;
			}
		}
	ruio:;
		int sum = 0;
		j = 1;
		for (int i = 1; i <= m; i++) {
			if (a[i] == 1) {
				b[j] = i;
				j++;
			}#include"bits/stdc++.h"
#define N 10000
using namespace std;
int main() {
	int a[N] , b[N], m, n, j = 1,hideo=1;
	char str[10];
	char  str1[10] = { "Fizz" }, str2[10] = { "Buzz" }, str3[10] = { "FizzBuzz" };
	memset(a, 1, sizeof(a));
	while (1) {
		cin >> m >> n;
		if (m == 0 && n == 0)return 0;
		for (int i = 1; i <= m; i++)a[i] = 1;
		for (int i = 1; i <= n; i++) {
			if (hideo == m - 1)goto ruio;
			if (j > m)j = 1;
			//cout << a[j] << endl;
			if (a[j] == 1) {
				memset(str, NULL, sizeof(str));
				cin >> str;
				if (strcmp(str, str1) == 0) {
					if (i % 3 == 0 && i % 5 != 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}
				}
				else if (strcmp(str, str2) == 0) {
					if (i % 3 != 0 && i % 5 == 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}
				}
				else if (strcmp(str, str3) == 0) {
					if (i % 3 == 0 && i % 5 == 0)goto hell;
					else {
						a[j] = -1; hideo++;
					}

				}
				else {
					char *s = str;
					int len;
					len = atoi(str);
					if (len % 3 == 0 || len % 5 == 0)a[j] = -1;
				}
			hell:;
				j++;
			}
		}
	ruio:;
		int sum = 0;
		j = 1;
		for (int i = 1; i <= m; i++) {
			if (a[i] == 1) {
				b[j] = i;
				j++;
			}
		}
		for (int i = 1; i < j; i++) {
			cout << b[i];
			if (i < j-1)cout << " ";
		}
		cout << endl;
	}
}


	

		}
		for (int i = 1; i < j; i++) {
			cout << b[i];
			if (i < j-1)cout << " ";
		}
		cout << endl;
	}
}


	

Compiler output:
a.cc:56:26: error: stray '#' in program
   56 |                         }#include"bits/stdc++.h"
      |                          ^
a.cc: In function 'int main()':
a.cc:18:45: warning: passing NULL to non-pointer argument 2 of 'void* memset(void*, int, size_t)' [-Wconversion-null]
   18 |                                 memset(str, NULL, sizeof(str));
      |                                             ^~~~
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:61:37: note:   declared here
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                                 ~~~~^~~
a.cc:56:27: error: 'include' was not declared in this scope
   56 |                         }#include"bits/stdc++.h"
      |                           ^~~~~~~
a.cc:59:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   59 | int main() {
      |         ^~
a.cc:59:9: note: remove parentheses to default-initialize a variable
   59 | int main() {
      |         ^~
      |         --
a.cc:59:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:59:12: error: a function-definition is not allowed here before '{' token
   59 | int main() {
      |            ^