criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <stream>
using namespace std;

int main(void)
{
	int N, i, j = 0, m = 0;;
	int A[100];

	cin >> N;

	for (i=1; i <= N; i++) {
		cin >> A[i];
		if (A[i] % 2 == 0) {
			m++;
			if (A[i] % 3 == 0 || A[i] % 5 == 0) {
				j++;
			}
		}
	}

	if (m == j && m != 0) {
		cout << "APROVED\n";
	}
	else {
		cout << "DENIED";
	}


	return 0;
}

Compiler output:
a.cc:1:10: fatal error: stream: No such file or directory
    1 | #include <stream>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>

int main(void)
{
  int Num, n;
  int flag=0;
  
  scanf("%d", %Num);
  
  int seisuu[Num]; 
  
  for(n=0;n<Num;n++)
  {
    scanf("%d",&seisuu[n]);
    if (seisuu[n]%2==0)
      if (seisuu[n]%3==0||seisuu[n]%5==0)
        flag=1;
  }
  if (flag)
    printf("APPROVED");
  else
    printf("DENIED");
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '%' token
    8 |   scanf("%d", %Num);
      |               ^
Language: C

#include <stdio.h>
int main(void){
  int a,i,j;
  int hantei = 0;
  scanf("%d",&a);
  int n[a][2];
  for(i=0; i<a; i++){
    scanf("%d",&n[i][0]);
    n[i][1] = 0;
  }
  for(j=0; j<a; j++){
    if(n[j][0]/2==0&&(n[j][0]/3==0||n[j][0]/5==0))
      n[j][1] = 1;
    hantei+=n[j][1];
  }
  if(hantei/a==1)
    printf("APPROVED");
  else
    printf("DENIED");
  return 0;

Compiler output:
main.c: In function 'main':
main.c:20:3: error: expected declaration or statement at end of input
   20 |   return 0;
      |   ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int a[N];
  for(int i=0;i<N;i++) {
    cin>>a[i];
  }
  string s="APPROVED";
  for(int i=0;i<N;i++) {
    if(a[i]%2==0) {
      if(a[i]%3!=0||a[i]%5!=0){
        s="DENIED"
          break;
      }
    }
  }
  cout<<s<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before 'break'
   14 |         s="DENIED"
      |                   ^
      |                   ;
   15 |           break;
      |           ~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
	int n,a;
	cin >> n;
	rep(i, n){
		cin >> a;
      	if(a%2 == 0) {
          	if(a%3 == 0 || a%5 == 0) {
            	continue; 
            } else {
            	cout << "DENIED" << endl; 
            }
        }
   }
	cout << "APPROVED" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |         rep(i, n){
      |             ^
a.cc:7:9: error: 'rep' was not declared in this scope
    7 |         rep(i, n){
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
int n,k,a;
cin>>n>>k;
int counter=0;
for(int i=0;i<n;i++){
cin>>a;
if(a%2==1||a%3==0||a%5==0){
counter++;}
if(counter==n){
cout<<"Yes"<<endl;}
else{
cout<<"No"<<endl;}}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected '}' at end of input
   15 | cout<<"No"<<endl;}}
      |                    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  
  int n,f=0;
  cin>>n;
  vector <int> a(n);
  for(int i=0;i<=n-1;i++)
    cin>>v[i];
   for(int i=0;i<=n-1;i++)
   {
     if(v[i]%2==0)
     {
       if(v[i]%3==0 || v[i]%5==0)
       {
         f=0;
       }
       else
         f=1;
     }
   }
  if(f==0)
    cout<<"APPROVED";
  else
    cout<<"DENIED";
  
  
  return 0;
  
}
         
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector <int> a(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | 
a.cc:9:11: error: expected primary-expression before 'int'
    9 |   vector <int> a(n);
      |           ^~~
a.cc:11:10: error: 'v' was not declared in this scope
   11 |     cin>>v[i];
      |          ^
a.cc:14:9: error: 'v' was not declared in this scope
   14 |      if(v[i]%2==0)
      |         ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  
  int n,f=0;
  cin>>n;
  vector <int> a(n);
  for(int i=0;i<=n-1;i++)
    cin>>v[i];
   for(int i=0;i<=n-1;i++)
   {
     if(v[i]%2==0)
     {
       if(v[i]%3==0 || v[i]%5==0)
       {
         f=0
       }
       else
         f=1
     }
   }
  if(f==0)
    cout<<"APPROVED";
  else
    cout<<"DENIED";
  
  
  return 0;
  
}
         
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vector' was not declared in this scope
    9 |   vector <int> a(n);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | 
a.cc:9:11: error: expected primary-expression before 'int'
    9 |   vector <int> a(n);
      |           ^~~
a.cc:11:10: error: 'v' was not declared in this scope
   11 |     cin>>v[i];
      |          ^
a.cc:14:9: error: 'v' was not declared in this scope
   14 |      if(v[i]%2==0)
      |         ^
a.cc:18:13: error: expected ';' before '}' token
   18 |          f=0
      |             ^
      |             ;
   19 |        }
      |        ~     
a.cc:21:13: error: expected ';' before '}' token
   21 |          f=1
      |             ^
      |             ;
   22 |      }
      |      ~
Language: C++

#include<iostream>
#include <numeric>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <bits/stdc++.h> 
using namespace std;
 
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) 
\
 
int main()
{
  int n,flag=0;
  cin>>n;
  vector <int> a(n);
  REP(i,0,n-1)
    cin>>a[i];
  REP(i,0,n-1)
  {
    if(a[i]%2==0)
    {
      if(a[i]%3==0 || a[i]%5==0)
      	flag=0;
      else
      {
        flag=1;
        break;
      }
   }
   if(flag==0)
     cout<<"APPROVED";
   else
     cout<<"DENIED";
   
    	
  
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:2: error: expected '}' at end of input
   41 | }
      |  ^
a.cc:14:1: note: to match this '{'
   14 | {
      | ^
Language: C++

#include<iostream>
#include <numeric>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <bits/stdc++.h> 
using namespace std;
 
#define REP(i, a, b) \
for (int i = int(a); i <= int(b); i++) 
\
 
int main()
{
  int n;
  vector <int> a(n);
  REP(i,0,n-1)
    cin>>a[i];
  REP(i,0,n-1)
  {
    if(a[i]%2==0)
    {
      if(a[i]%3==0 || a[i]%5==0)
      	flag=0;
      else
      {
        flag=1;
        break;
      }
   }
   if(flag==0)
     cout<<"APPROVED";
   else
     cout<<"DENIED";
   
    	
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: 'flag' was not declared in this scope
   24 |         flag=0;
      |         ^~~~
a.cc:27:9: error: 'flag' was not declared in this scope
   27 |         flag=1;
      |         ^~~~
a.cc:31:7: error: 'flag' was not declared in this scope
   31 |    if(flag==0)
      |       ^~~~
a.cc:40:2: error: expected '}' at end of input
   40 | }
      |  ^
a.cc:14:1: note: to match this '{'
   14 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long n;cin >> n;
  string S="APPROVED"
  for (int i=0;i<n;i++) {
    long long a;cin >> a;
	if (a%2==0 && (a%3)*(a%5)>0) S="DENIED";
  }
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'for'
    7 |   for (int i=0;i<n;i++) {
      |   ^~~
a.cc:7:16: error: 'i' was not declared in this scope
    7 |   for (int i=0;i<n;i++) {
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin>>N;
  vector<int>A(N);
  for(int i=0;i<N;i++){
    cin>>A[i];
  }
  for(int i=0;i<N;i++){
    if(A[i]%2==0&&(A[i]%3!=0&&A[i]%5!=0){
      cout<<"DENIED"<<endl;
    }
    else{
      cout<<"APPROVED"<<endl;
    }
  }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:12:41: error: expected ')' before '{' token
   12 |     if(A[i]%2==0&&(A[i]%3!=0&&A[i]%5!=0){
      |       ~                                 ^
      |                                         )
a.cc:18:3: error: expected primary-expression before '}' token
   18 |   }
      |   ^
Language: C

#include<stdio.h>
int main(void)
{
	int N,A[100],i;

	scanf("%d",&N);

	for(i=0;i<N;i++)
		scanf("%d",&A[i]);

		for(i=0;i<N;i++)	
	if((A[i]%2==0)&&(A[i]%3!=0)&&(A[i]%5!=0))
		printf("DINIED\n");
	
	return 0;
	}
 	
	printf("APPROVED\n");

	return 0;

}



Compiler output:
main.c:18:16: error: expected declaration specifiers or '...' before string constant
   18 |         printf("APPROVED\n");
      |                ^~~~~~~~~~~~
main.c:20:9: error: expected identifier or '(' before 'return'
   20 |         return 0;
      |         ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
   22 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
	int N,A[100],i;

	scanf("%d",&N);

	for(i=0;i<N;i++)
		scanf("%d",&A[I]);

		for(i=0;i<N;i++)	
	if((A[i]%2==0)&&(A[i]%3!=0)&&(A[i]%5!=0))
		printf("DINIED\n");
	
	return 0;
	}
 	
	printf("APPROVED\n");

	return 0;

}



Compiler output:
main.c: In function 'main':
main.c:9:31: error: 'I' undeclared (first use in this function)
    9 |                 scanf("%d",&A[I]);
      |                               ^
main.c:9:31: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:18:16: error: expected declaration specifiers or '...' before string constant
   18 |         printf("APPROVED\n");
      |                ^~~~~~~~~~~~
main.c:20:9: error: expected identifier or '(' before 'return'
   20 |         return 0;
      |         ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
   22 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,a[n];
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a[i];
  }
  for(int i=0;i<n;i++){
    while(a[i]%2==0){
      if(a[i]%3==0||a[i]%5==0){
        cout<<"APPROVED";
      }
      else{
        cout<<"DENIED;
      }
    }
  }
  return 0;
}
      
  

Compiler output:
a.cc:15:15: warning: missing terminating " character
   15 |         cout<<"DENIED;
      |               ^
a.cc:15:15: error: missing terminating " character
   15 |         cout<<"DENIED;
      |               ^~~~~~~~
a.cc: In function 'int main()':
a.cc:16:7: error: expected primary-expression before '}' token
   16 |       }
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int>A(N);
	for(int i = 0; i < N; i++) {
	cin>>A[i];
    }
	if (A[i]%2 == 0 && A[i]%3 != 0 || A[i]%2 == 0 && A[i]%3 != 0 ) {
          cout << "DENIED" << endl;
    }
    else {
    cout << "APPROVED" << endl;
    } 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'i' was not declared in this scope
   10 |         if (A[i]%2 == 0 && A[i]%3 != 0 || A[i]%2 == 0 && A[i]%3 != 0 ) {
      |               ^
Language: C++

#include<stdio.h>
int main(void){
  
  int n,a,oi=1,i;
  
  scanf("%d",&n);
  for(i=0; i<n; i++){
    scanf("%d",&a);
    if(a%2==0 && a%3!=0 && a%5!=0) oi=0;
  }
  
  if(oi=1)  printf("APPROVED");
  else      printf("DENIED");
  
  return 0;
}#include<stdio.h>
int main(void){
  
  int n,a,oi=1,i;
  
  scanf("%d",&n);
  for(i=0; i<n; i++){
    scanf("%d",&a);
    if(a%2 == 0)  if(a%3!=0 && a%5!=0) oi=0;
  }
  
  if(oi=1)  printf("APPROVED");
  else      printf("DENIED");
  
  return 0;
}

Compiler output:
a.cc:16:2: error: stray '#' in program
   16 | }#include<stdio.h>
      |  ^
a.cc:16:3: error: 'include' does not name a type
   16 | }#include<stdio.h>
      |   ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int>A(N);
	for(int i = 0; i < N; i++) {
	cin>>A[i];
	if (A[i]%2 == 0) {
		if(A[i]%3 == 0 || A[i]%5 == 0){
          cout << "Yes" << endl;
	}
    }
    }
    else {
    cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else {
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int>A(N);
	for(int i = 0; i < N; i++) {
	cin>>A[i];
	}
	if (A[i]%2 == 0) {
		if(A[i]%3 == 0 || A[i]%5 == 0){
          cout << "Yes" << endl;
	}
    }
    else {
    cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'i' was not declared in this scope
   10 |         if (A[i]%2 == 0) {
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	int N;
	cin >> N;
	vector<int>A(N);
	for(int i; i < N; i++) {
	cin>>A[i];
	}
	if (A[i]%2 == 0) {
		if(A[i]%3 == 0 || A[i]%5 == 0){
          cout << "Yes" << endl;
	}
    else {
    cout << "No" << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'i' was not declared in this scope
   10 |         if (A[i]%2 == 0) {
      |               ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;

int main() {
  int n;
  int a[n];
  cin >> n;
  rep(i,n) cin >> a[i];
  bool ok = true;
  rep(i,n) {
    if (a[i]%2 == 1) continue;
    if (a[i]%3 != 0 && a[i]%5 != 0) ok = false;
  }
  if (ok) cout << "APPROVED" << endl;
  else cout << "DEFIED << endl;
 
return 0;
}

Compiler output:
a.cc:16:16: warning: missing terminating " character
   16 |   else cout << "DEFIED << endl;
      |                ^
a.cc:16:16: error: missing terminating " character
   16 |   else cout << "DEFIED << endl;
      |                ^~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:18:1: error: expected primary-expression before 'return'
   18 | return 0;
      | ^~~~~~
Language: C

#include<stdio.h>
int main()
{
  int x;
  scanf("%d",&x);
  if((x%2==0) &&(x is divisible by 3)||(x is divisible by 5))
  {
     printf("APPROVED");
   }
   else
   {
      printf("Denied");
   }

  return 0;
}    
     

Compiler output:
main.c: In function 'main':
main.c:6:19: error: expected ')' before 'is'
    6 |   if((x%2==0) &&(x is divisible by 3)||(x is divisible by 5))
      |                 ~ ^~~
      |                   )
main.c:6:42: error: expected ')' before 'is'
    6 |   if((x%2==0) &&(x is divisible by 3)||(x is divisible by 5))
      |                                        ~ ^~~
      |                                          )
Language: C

#include<stdio.h>
int main()
{
    int x;
    printf("Enter any number:");
    scanf("%d"&x);
    if(x%2==0)
      {
      if((x is divisible by 3) &&(x is divisible by 5) 
      {
        printf("APPROVED");
      } 
  else
  {
   printf("DENIED");
  }

  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:6:15: error: invalid operands to binary & (have 'char *' and 'int')
    6 |     scanf("%d"&x);
      |           ~~~~^
      |           |
      |           char *
main.c:9:12: error: expected ')' before 'is'
    9 |       if((x is divisible by 3) &&(x is divisible by 5)
      |          ~ ^~~
      |            )
main.c:9:36: error: expected ')' before 'is'
    9 |       if((x is divisible by 3) &&(x is divisible by 5)
      |                                  ~ ^~~
      |                                    )
main.c:9:55: error: expected ')' before '{' token
    9 |       if((x is divisible by 3) &&(x is divisible by 5)
      |         ~                                             ^
      |                                                       )
   10 |       {
      |       ~                                                
main.c:19:1: error: expected expression before '}' token
   19 | }
      | ^
main.c:19:1: error: expected declaration or statement at end of input
Language: C++

#include <bits/stdc++.h>
#include <cmath>
using namespace std;

int main () {
  int N;
  cin >> N;
  for (int i = 0;i < N;i++) {
  int A;
  cin >> A
  if (A % 2 == 0 ) {
  if (A % 3 != 0 && A % 5 != 0){
  cout << "DENIED" << endl;
    return 0;
  }
  else {
  continue;
  }
  }
  }
  cout << "APPROVED" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before 'if'
   10 |   cin >> A
      |           ^
      |           ;
   11 |   if (A % 2 == 0 ) {
      |   ~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N;
  bool O = true;
  cin >> N;
  while (N>0) {
    int A;
    cin >> A;
    if (A % 2 == 0 && A % 3 != 0 || A % 5 != 0) {
         O = false;
         break;
       }
       N--;
      }
  }
  if (O) cout << "APPROVED" <<endl;
  else cout << "DENIED" <<endl;
 }



Compiler output:
a.cc:17:3: error: expected unqualified-id before 'if'
   17 |   if (O) cout << "APPROVED" <<endl;
      |   ^~
a.cc:18:3: error: expected unqualified-id before 'else'
   18 |   else cout << "DENIED" <<endl;
      |   ^~~~
a.cc:19:2: error: expected declaration before '}' token
   19 |  }
      |  ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
 int O=0;
        int A;

  cin >> N;
  while (N>0)
  {

    cin >> A;
    if (A%2==0)
    { 

      if ((A%3!=0)||(A%5!=0))
      { O=1;
                break;
          }
        

          
          N=N-1;
          }
          if (O==0)
          cout << "APPROVED" <<endl;
          if (O!=0)
          cout << "DENITED" <<endl;
          }


Compiler output:
a.cc: In function 'int main()':
a.cc:30:12: error: expected '}' at end of input
   30 |           }
      |            ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
  int A;
  int O;
  cin >> N;
  while (N>0)
  {
    cin >> A;
    if (A%2==0)
    {
      if ((A%3==0)||(A%5==0)
          {
            N=N-1;
          }
          else 
          {
            O=1;
          }
          }
          if (O==1)          
          break;
          
          N=N-1;
          }
          if (O==0)
          cout << "APPROVED" <<endl;
          if (O==1)
          cout << "DENITED" <<endl;
          }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:29: error: expected ')' before '{' token
   14 |       if ((A%3==0)||(A%5==0)
      |          ~                  ^
      |                             )
   15 |           {
      |           ~                  
a.cc:22:11: error: expected primary-expression before '}' token
   22 |           }
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
  int A;
  int O;
  cin >> N;
  while (N>0)
  {
    cin A;
    if (A%2==0)
    {
      if ((A%3==0)||(A%5==0)
          {
            N=N-1;
          }
          else 
          {
            O=1;
          }
          }
          if (O==1)          
          break;
          
          N=N-1;
          }
          if (O==0)
          cout << "APPROVED" <<endl;
          if (O==1)
          cout << "DENITED" <<endl;
          }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected ';' before 'A'
   11 |     cin A;
      |        ^~
      |        ;
a.cc:14:29: error: expected ')' before '{' token
   14 |       if ((A%3==0)||(A%5==0)
      |          ~                  ^
      |                             )
   15 |           {
      |           ~                  
a.cc:22:11: error: expected primary-expression before '}' token
   22 |           }
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
  int A;
  int O;
  cin >> N;
  while (N>0)
  {
    cin >> A;
    if (A%2==0)
    {
      if ((A%3==0)||(A%5==0))
          {
            N=N-1;
          }
          else 
          {
            O=1;
          }
          }
          if (O==1)          
          break;
          
          N=N-1;
          }
          if (O==0)
          cout << APPROVED <<endl;
          if (O==1)
          cout << DENITED <<endl;
          }


Compiler output:
a.cc: In function 'int main()':
a.cc:29:19: error: 'APPROVED' was not declared in this scope
   29 |           cout << APPROVED <<endl;
      |                   ^~~~~~~~
a.cc:31:19: error: 'DENITED' was not declared in this scope; did you mean 'WEXITED'?
   31 |           cout << DENITED <<endl;
      |                   ^~~~~~~
      |                   WEXITED
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
  int A;
  int O;
  cin >> N;
  while (N>0)
  {
    cin A;
    if (A%2==0)
    {
      if ((A%3==0)||(A%5==0)
          {
            N=N-1;
          }
          else 
          {
            O=1;
          }
          }
          if (O==1)          
          break;
          
          N=N-1;
          }
          if (O==0)
          cout << APPROVED <<endl;
          if (O==1)
          cout << DENITED <<endl;
          }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected ';' before 'A'
   11 |     cin A;
      |        ^~
      |        ;
a.cc:14:29: error: expected ')' before '{' token
   14 |       if ((A%3==0)||(A%5==0)
      |          ~                  ^
      |                             )
   15 |           {
      |           ~                  
a.cc:22:11: error: expected primary-expression before '}' token
   22 |           }
      |           ^
a.cc:29:19: error: 'APPROVED' was not declared in this scope
   29 |           cout << APPROVED <<endl;
      |                   ^~~~~~~~
a.cc:31:19: error: 'DENITED' was not declared in this scope; did you mean 'WEXITED'?
   31 |           cout << DENITED <<endl;
      |                   ^~~~~~~
      |                   WEXITED
Language: C++

#include <iostream>
using namespace std;
int main()
{
int N;
  int A;
  int O;
  cin >> N;
  while (N>0)
  {
    cin A;
    if (A%2=0)
    {
      if ((A%3=0)||(A%5=0)
          {
            N=N-1;
          }
          else 
          {
            O=1;
          }
          }
          if (O=1)          
          break;
          
          N=N-1;
          }
          if (O=0)
          cout << APPROVED <<endl;
          if (O=1)
          cout << DENITED <<endl;
          }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected ';' before 'A'
   11 |     cin A;
      |        ^~
      |        ;
a.cc:12:10: error: lvalue required as left operand of assignment
   12 |     if (A%2=0)
      |         ~^~
a.cc:14:13: error: lvalue required as left operand of assignment
   14 |       if ((A%3=0)||(A%5=0)
      |            ~^~
a.cc:14:22: error: lvalue required as left operand of assignment
   14 |       if ((A%3=0)||(A%5=0)
      |                     ~^~
a.cc:14:27: error: expected ')' before '{' token
   14 |       if ((A%3=0)||(A%5=0)
      |          ~                ^
      |                           )
   15 |           {
      |           ~                
a.cc:22:11: error: expected primary-expression before '}' token
   22 |           }
      |           ^
a.cc:29:19: error: 'APPROVED' was not declared in this scope
   29 |           cout << APPROVED <<endl;
      |                   ^~~~~~~~
a.cc:31:19: error: 'DENITED' was not declared in this scope; did you mean 'WEXITED'?
   31 |           cout << DENITED <<endl;
      |                   ^~~~~~~
      |                   WEXITED
Language: C++

n = int(input())
try:
  a = list(map(int,input().split()))
  a1 = list(i for i in a if i%2==0)
  a2 = list(i for i in a1 if i%3!=0)
  a3 = list(i for i in a2 if i%5!=0)
except EOFError:
  pass
if len(a3) == 0:
  print('APPROVED')
else:
  print('DENIED')

Compiler output:
a.cc:10:9: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   10 |   print('APPROVED')
      |         ^~~~~~~~~~
a.cc:12:9: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 |   print('DENIED')
      |         ^~~~~~~~
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C

#include <stdio.h>
int main (void) { 
  int i;
  int a[100]; 
  for (i = 0; i < n; i++) { 
    scanf("%d", &a[i]); 
  }
  for (i = 0; i < n; i++) { 
    if (a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) { 
      puts("DENIED"); 14 return 0; 
    } 
  } 
  puts("APPROVED");
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:5:19: error: 'n' undeclared (first use in this function)
    5 |   for (i = 0; i < n; i++) {
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: expected ';' before 'return'
   10 |       puts("DENIED"); 14 return 0;
      |                         ^~~~~~~
      |                         ;
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i)
		cin >> a[i];
	for (int i = 0; i < n; ++i)
	{
		if (a[i] % 2 == 0)
		{
			if (!(a[i] % 3 == 0 || a[i]% 5 == 0)
			{
				cout << "DENIED";
				return 0;
			}
		}
	}
	cout << "APPROVED";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:61: error: expected ')' before '{' token
   16 |                         if (!(a[i] % 3 == 0 || a[i]% 5 == 0)
      |                            ~                                ^
      |                                                             )
   17 |                         {
      |                         ~                                    
a.cc:21:17: error: expected primary-expression before '}' token
   21 |                 }
      |                 ^
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i)
		cin >> a[i];
	for (int i = 0; i < n; ++i)
	{
		if (a[i] % 2 == 0)
		{
			if (!(a[i] % 3 == 0 || a[i]% 5 == 0)
				cout << "DENIED";
			return 0;
		}
	}
	cout << "APPROVED";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:61: error: expected ';' before 'cout'
   16 |                         if (!(a[i] % 3 == 0 || a[i]% 5 == 0)
      |                                                             ^
      |                                                             ;
   17 |                                 cout << "DENIED";
      |                                 ~~~~                         
a.cc:18:25: error: expected primary-expression before 'return'
   18 |                         return 0;
      |                         ^~~~~~
a.cc:17:50: error: expected ')' before 'return'
   17 |                                 cout << "DENIED";
      |                                                  ^
      |                                                  )
   18 |                         return 0;
      |                         ~~~~~~                    
a.cc:16:28: note: to match this '('
   16 |                         if (!(a[i] % 3 == 0 || a[i]% 5 == 0)
      |                            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

 int main () {
int N;
   cin>>N;

 int A[100];
 for (int i = 0; i < N; i++) {
cin>>A[i];
 }

 for (int i = 0; i < N; i++) {
 if (A[i] % 2 == 0 && A[i] % 3 != 0 && A[i] % 5 != 0) {
 cout<<"DENIED"endl;

 }
 }
 cout<<"APPROVED"<<endl;
 
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: unable to find string literal operator 'operator""endl' with 'const char [7]', 'long unsigned int' arguments
   15 |  cout<<"DENIED"endl;
      |        ^~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N;
  cin>>N;
  vector<int>A(N);
  for(int i=0;i<N;i++){
  cin>>A(i);
    if(A(i)%2==0){
    if(A(i)%3==0||A(i)%5==0){
    cout<<"APPROVED"<<endl;
    }
    }
  
  }
cout<<"DENIED"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: no match for call to '(std::vector<int>) (int&)'
    8 |   cin>>A(i);
      |        ~^~~
a.cc:9:9: error: no match for call to '(std::vector<int>) (int&)'
    9 |     if(A(i)%2==0){
      |        ~^~~
a.cc:10:9: error: no match for call to '(std::vector<int>) (int&)'
   10 |     if(A(i)%3==0||A(i)%5==0){
      |        ~^~~
a.cc:10:20: error: no match for call to '(std::vector<int>) (int&)'
   10 |     if(A(i)%3==0||A(i)%5==0){
      |                   ~^~~
Language: C++

#include<stdio.h>

int main(){

  int n,i,is=0;
  scanf("%d",&n);
  int a[n];

    for(i=0;i<n;i++){
      scanf("%d",&a[i]);
    }

      for(i=0;i<n;i++){
        if(a[i]%2==0){
          if(a[i]%3!=0&&a[i]%5!=0)is=1;
        }
      }
      if(is==0){
        printf("APPROVED\n");
      }else{
        printf("DENIED\n")
      }
      return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:27: error: expected ';' before '}' token
   21 |         printf("DENIED\n")
      |                           ^
      |                           ;
   22 |       }
      |       ~
Language: C

N = input()
flag = True
L = list(map(int,input().split()))

for i in range(N):
    if L[i]%2==0 and (L[i]%3!=0 and L[i]%5!=0):
            flag = False
            break
        
if flag==True:
    print("APPROVED")
else:
    print("DENIED")

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | N = input()
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
main.c:1:5: error: implicit declaration of function 'input' [-Wimplicit-function-declaration]
    1 | N = input()
      |     ^~~~~
main.c:1:5: error: initializer element is not constant
main.c:2:1: error: expected ',' or ';' before 'flag'
    2 | flag = True
      | ^~~~
Language: C

#include <stdio.h>
int main(){
	int n,k = 0;
	scanf("%d",&n);
	int a[n];
	for (int i = 0;i < n;i++){
		scanf("%d",&a[i]);
	if ((a[i] % 6 != 0)||(a[i] % 10 != 0){
			k = 1;}
	}
	if(k == 0)printf("APPROVED");
	else printf("DENIED");
}
		

Compiler output:
main.c: In function 'main':
main.c:8:46: error: expected ')' before '{' token
    8 |         if ((a[i] % 6 != 0)||(a[i] % 10 != 0){
      |            ~                                 ^
      |                                              )
main.c:10:9: error: expected expression before '}' token
   10 |         }
      |         ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<stack>
#include<set>

using ll = long long;

using namespace std;

long long x = 1000000007;

ll n_pow(ll a, ll n) {
	if (n == 0)return 1;
	ll t = n_pow(a, n / 2);
	t *= t;
	t %= x;
	if (n % 2 == 1)t *= a;
	return t % x;
}

int main() {
	int n;
	cin >> n;
	vector<int>a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	bool ok = true;
	for (int i = 0; i < n; i++) {
		if (a[i] % 2 == 0) {
			if (a[i] % 3 == 0 || a[i] % 5 == 0) {}
			else {
				ok = false;
				break;
			}
	}
		if (ok)cout << "APPROVED" << endl;
		else cout << "DENIED" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:25:12: note: to match this '{'
   25 | int main() {
      |            ^
Language: C

#include<stdio.h>
int main(void){
  int i;
  int a[100];
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<n;i++){
    if(a[i]%2==0 && a[i]%3!=0 && a[i]%5!=0){
      printf("DENIED\n");
      return 0;
    }
  }
  printf("APPROVED");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:13: error: 'n' undeclared (first use in this function)
    5 |   for(i=0;i<n;i++){
      |             ^
main.c:5:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
vector<int> input(int N) {
  vector<int> vec(N);
  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
  }
  return vec;
}

int main() {
  int n;
  cin >> n;
  vector<int> v = input(n);
  rep(i,n){
    if(v[i]%2==0&&v[i]%3!=0&&v[i]%5!=0){
      cout << "DENIED" << endl;
      break;
    }else{
      cout << "APPROVED" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:2: error: expected '}' at end of input
   23 | }
      |  ^
a.cc:12:12: note: to match this '{'
   12 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  int N, A;
  for(int i = 0; i < N; i++){
    cin >> A;
    if(A % 2 == 0){
      if(A % 3 == 0 || A % 5 == 0){
        continue;
      } else{
        cout << "DENIED" <<endl;
        return 0;
      }
    }
  }
  cout << "APPROVED"
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:21: error: expected ';' before '}' token
   20 |   cout << "APPROVED"
      |                     ^
      |                     ;
   21 | }
      | ~
Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<bool> vb;
#define pb push_back
#define fi first
#define se second
#define in insert
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int mod = 1e9 + 7;
void solve(){
    int n;
    cin >> n;
    bool is = true;
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        if (x % 2 == 0) {
            if (x % 5 != 0 && x % 3 != 0) is = false;
        }
    } 
    if (is) cout << "APPROVED";
    else cout << "DENIED"
}
int main(){
    speed;
    int t = 1;
    //cin >> t;
    for (int i = 1; i <= t; ++i) {
        solve();
    }
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:29:26: error: expected ';' before '}' token
   29 |     else cout << "DENIED"
      |                          ^
      |                          ;
   30 | }
      | ~
Language: C

#include <stdio.h>

int main (void) {
int i;

int a[100];
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
}

for (i = 0; i < n; i++) {
if (a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) {
puts("DENIED");
return 0;
}
}
puts("APPROVED");

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: 'n' undeclared (first use in this function)
    7 | for (i = 0; i < n; i++) {
      |                 ^
main.c:7:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
	}
	for (int i = 0; i < n; ++i)
	{
		if (a[i]%2 == 0)
		{
			if(a[i]%2 == 0 & z%3 == 0 or z%5 == 0)
			cout << "APPROVED";
			cout << "DENIED";
			return 0;
		}
	}
	cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:42: error: 'z' was not declared in this scope
   18 |                         if(a[i]%2 == 0 & z%3 == 0 or z%5 == 0)
      |                                          ^
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	int z = a[0]
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
		if (a[i]%2 == 0)
		{
			z = a[i];
			if(z%3 == 0 or z%5 == 0)
			cout << "APPROVED";
			else
			cout << "DENIED";
			return 0;
		}
	}
	cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'for'
   11 |         for (int i = 0; i < n; ++i)
      |         ^~~
a.cc:11:25: error: 'i' was not declared in this scope
   11 |         for (int i = 0; i < n; ++i)
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	int z = a[0]
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
		if (a[i]%2 == 0)
		{
			z = a[i];
			if(z%3 == 0 or z%5 == 0)
			cout << "APPROVED";
			return 0;
		}
	}
	cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'for'
   11 |         for (int i = 0; i < n; ++i)
      |         ^~~
a.cc:11:25: error: 'i' was not declared in this scope
   11 |         for (int i = 0; i < n; ++i)
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	int z = a[0]
	for (int i = 0; i < n; ++i)
	{
		cin >> a[i];
		if (a[i]%2 == 0)
		{
			z = a[i]
			if(z%3 == 0 or z%5 == 0)
			cout << "APPROVED";
			return 0;
		}
	}
	cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ',' or ';' before 'for'
   11 |         for (int i = 0; i < n; ++i)
      |         ^~~
a.cc:11:25: error: 'i' was not declared in this scope
   11 |         for (int i = 0; i < n; ++i)
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int a[1000];

int main()
{
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i)
	{
		cin >> s[i];
		if (s[i]%2 == 0; s[i]%3 == 0 or s[i]%5 == 0)
		{
			cout << "APPROVED";
		}
	}
	cout << "DENIED";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: 's' was not declared in this scope
   12 |                 cin >> s[i];
      |                        ^
Language: C++

#include<bits/stdc++.H>
using namespace std;
int main(){
int N; cin>>N;
  vector <int> A(N);
  for(int i=0;i<N;i++){
  cin>>A.at(i);
  }
  string ans="APPROVED";
  for(int i=0;i<N;i++){
  if(A.at(i)%2==0 && A.at(i)%3!=0 && A.at(i)%5!=0){
   ans="DENIED"; break;
  
  }
  
  
 }cout<<ans<<endl;
 
  return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stdc++.H: No such file or directory
    1 | #include<bits/stdc++.H>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <cxxabi.h>

using namespace std;
typedef long long ll;

#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()
#define all2(a, b) (a).begin(), (a).begin() + (b)
#define debug(vari) cerr << #vari << " = " << (vari) << endl;

char *demangle(const char *demangle)
{
    int status;
    return abi::__cxa_demangle(demangle, 0, 0, &status);
}

int main()
{
    int n;
    cin >> n;
    vector<int> vec(n);
    rep(i, n) cin >> vec[i];
    bool ok = true;
    rep(i, n)
    {
        if (A[i] % 2 == 0 && (A[i] % 3 != 0 && A[i] % 5 != 0))
        {
            ok = false;
        }
    }
    puts(ok ? "APPROVED" : "DENIED");

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: 'A' was not declared in this scope
   28 |         if (A[i] % 2 == 0 && (A[i] % 3 != 0 && A[i] % 5 != 0))
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;

  vector<int> math(N); 

  for (int i = 0; i < N; i++) {
    cin >> math.at(i);
  }
  if (math.at(i)%2 == 0 && math.at(i)%3 == 0) {
    cout <<"APPROVED"<<endl;
  }
  if (math.at(i)%2 == 0 && math.at(i)%5 == 0) {
    cout <<"APPROVED"<<endl;
  }
  else {
    cout <<"DENIED"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'i' was not declared in this scope
   13 |   if (math.at(i)%2 == 0 && math.at(i)%3 == 0) {
      |               ^
a.cc:16:15: error: 'i' was not declared in this scope
   16 |   if (math.at(i)%2 == 0 && math.at(i)%5 == 0) {
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int n;
  cin >> n;
  vector<int> v (n);
  for(int i=0;i<n;i++)
    cin >> v[i];
  bool flag= false;
  for(int a: n){
    if(a%2==0){
      if(a%3!=0 && a%5!=0){
        flag=true;
        break;
        }
      }
    }
    if(flag)
      cout << "DENIED\n";
    else
      cout << "APPROVED\n";
  return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'begin' was not declared in this scope
   11 |   for(int a: n){
      |              ^
a.cc:11:14: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:11:14: error: 'end' was not declared in this scope
   11 |   for(int a: n){
      |              ^
a.cc:11:14: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C

 #include <stdio.h>
int main (void) { 
  int i;
  int a[100]; 
  for (i = 0; i < n; i++) { 
    scanf("%d", &a[i]); 
  }
  for (i = 0; i < n; i++) { 
    if (a[i] % 2 == 0 && a[i] % 3 != 0 && a[i] % 5 != 0) { 
      puts("DENIED"); 
      return 0; 
    } 
  } 
  puts("APPROVED");
 return 0; 
}

Compiler output:
main.c: In function 'main':
main.c:5:19: error: 'n' undeclared (first use in this function)
    5 |   for (i = 0; i < n; i++) {
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fr(i,j,k) for(int i=j;i<k;i++)
#define f(n) fr(i,0,n)
#define f1(n) fr(i,1,n+1)
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()

int main() {
    int n;
    cin >> n;
    f(n) {
        int x;
        cin >> x;
        if (x % 3 && x % 5) {
            cout << "DENIED\n";
            eixt(0);
        }
    }
    cout << "APPROVED\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:13: error: 'eixt' was not declared in this scope; did you mean 'exit'?
   20 |             eixt(0);
      |             ^~~~
      |             exit
Language: C++

#include<iostream>
using namespace std;

int check(int k){
    if (k%2 == 0){
        if (k%3 == 0 || k%5 == 0){
            return 0;
        }
    }
    return 1;
}

int main(){
    int n;

    cin >> n;
    int a[n], k;
    k = 0;

    for (int i = 0; i < n ; i++) {
        cin >> a[i];
        if (check(a[i]) == 1){
            k = 1;
            cout << "DENIED" << endl;
            return 0
        }
    }


    cout << "APPROVED" << endl;
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: expected ';' before '}' token
   25 |             return 0
      |                     ^
      |                     ;
   26 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;

int check(int k){
    if (k%2 == 0){
        if (k%3 == 0 || k%5 == 0){
            return 0;
        }
        return 1;
    }
    return 0;
    
}

int main(){
    int n;

    cin >> n;
    int a[n], k;
    k = 0;

    for (int i = 0; i < n ; i++) {
        cin >> a[i];
        if (check(a[i]) == 1){
            k = 1;
            cout << "DENIED" << endl;
            return 0
        }
    }


    cout << "APPROVED" << endl;
    
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before '}' token
   27 |             return 0
      |                     ^
      |                     ;
   28 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;

int check(int k){
    if (k%2 == 0){
        if (k%3 == 0 || k%5 == 0){
            return 0;
        }
        return 1;
    }
    return 0
    
}

int main(){
    int n;

    cin >> n;
    int a[n], k;
    k = 0;

    for (int i = 0; i < n ; i++) {
        cin >> a[i];
        if (check(a[i]) == 1){
            k = 1;
            cout << "DENIED" << endl;
            return 0
        }
    }


    cout << "APPROVED" << endl;
    
    return 0;
}



Compiler output:
a.cc: In function 'int check(int)':
a.cc:11:13: error: expected ';' before '}' token
   11 |     return 0
      |             ^
      |             ;
   12 | 
   13 | }
      | ~            
a.cc: In function 'int main()':
a.cc:27:21: error: expected ';' before '}' token
   27 |             return 0
      |                     ^
      |                     ;
   28 |         }
      |         ~
Language: C++


int main(){
    int n;

    cin >> n;
    int a[n], k;
    k = 0;

    for (int i = 0; i < n ; i++) {
        cin >> a[i];
    }

    for (int i = 0; i < n ; i++) {
        if (check(a[i]) == 1){
            k = 1;
            break;
        }
    }

    if (k == 1){
        cout << "DENIED" << endl;
    } else {
        cout << "APPROVED" << endl;
    }

    return 0;
}

int check(int k){
    if (k%2 == 0){
        if (k%3 == 0 || k%5 == 0){
            return 0
        }
    }
    return 1
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> n;
      |     ^~~
a.cc:14:13: error: 'check' was not declared in this scope
   14 |         if (check(a[i]) == 1){
      |             ^~~~~
a.cc:21:9: error: 'cout' was not declared in this scope
   21 |         cout << "DENIED" << endl;
      |         ^~~~
a.cc:21:29: error: 'endl' was not declared in this scope
   21 |         cout << "DENIED" << endl;
      |                             ^~~~
a.cc:23:9: error: 'cout' was not declared in this scope
   23 |         cout << "APPROVED" << endl;
      |         ^~~~
a.cc:23:31: error: 'endl' was not declared in this scope
   23 |         cout << "APPROVED" << endl;
      |                               ^~~~
a.cc: In function 'int check(int)':
a.cc:32:21: error: expected ';' before '}' token
   32 |             return 0
      |                     ^
      |                     ;
   33 |         }
      |         ~            
a.cc:35:13: error: expected ';' before '}' token
   35 |     return 1
      |             ^
      |             ;
   36 | }
      | ~
Language: C

#include <stdio.h>

int main(void){
   int n,i,result=0;
   scanf("%d",&n);
   int authNum[n];
   for (i=0;i<n;i++)
      scanf("%d",&authNum[i]);

   for (i=0;i<n;i++)
      if((authNum[i]%2==0) && (authNum[i]%3!=0) && (authNum[i]%5!=0)){
        printf("DENIED on %d\n",i);return 0;
      }

   printf("APPROVED\n");
   return 0;
}
~


Compiler output:
main.c:18:1: error: expected identifier or '(' before '~' token
   18 | ~
      | ^
Language: C

#include <stdio.h>

int main(void){
   int n,i,result=0;
   scanf("%d",&n);
   int authNum[n];
   for (i=0;i<n;i++)
      scanf("%d",&authNum[n]);

   for (i=0;i<n;i++){
      if(authNum[i]%2==0){
        if((authNum[i]%3==0)||(authNum[i]%5==0)){} else { result=-1;}
      }
   }

   if (result!=-1) printf("APPROVED\n");
   else printf("DENIED\n");
   return 0;
}
~
~


Compiler output:
main.c:20:1: error: expected identifier or '(' before '~' token
   20 | ~
      | ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int n;
  cin >>n;
  int identifer=0;
  int i;
  for(i=0;i<n;i++){int v;cin >>v;
                   if(v%2==0){if(v%3==0 || v%5==0) identifier=0; else identifier=1;}}
  if (identifier==0) cout<<"APPROVED";
  else cout<<"DENIED";}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:52: error: 'identifier' was not declared in this scope; did you mean 'identifer'?
    9 |                    if(v%2==0){if(v%3==0 || v%5==0) identifier=0; else identifier=1;}}
      |                                                    ^~~~~~~~~~
      |                                                    identifer
a.cc:9:71: error: 'identifier' was not declared in this scope; did you mean 'identifer'?
    9 |                    if(v%2==0){if(v%3==0 || v%5==0) identifier=0; else identifier=1;}}
      |                                                                       ^~~~~~~~~~
      |                                                                       identifer
a.cc:10:7: error: 'identifier' was not declared in this scope; did you mean 'identifer'?
   10 |   if (identifier==0) cout<<"APPROVED";
      |       ^~~~~~~~~~
      |       identifer