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

#include <iostream>

int main()
{
  int num, sum = 0;
  cin << num;
  for(int i = 1; i <= num; i++)
  {
    sum += i;
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin << num;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << sum << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << sum << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string> 
 
using namespace std;
 
int main() 
{
  string s;
  cin>>s;
  vector<char> v;
  for(char ch: s) {
  	if(ch != 'B')v.push_back(ch);
    else if(v.size() > 1) v.pop_back();
}

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

#include <stdio.h>
#include <string.h>

int main(){
	char a[11];
	scanf("%s",a);
	for(int i=0;i<strlen(a);i++){
		int db=0;
		if(a[i]=='B'&&i!=0){
			int j=i;
			int k=1;
			while(a[j]=='B'){
				a[i-k]='B';
				k++;
				j++
			}
			db++
		}
	}
	for(int i=0;i<strlen(a);i++){
		if(s[i]!='B'){
			printf("%c",s[i])
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:36: error: expected ';' before '}' token
   15 |                                 j++
      |                                    ^
      |                                    ;
   16 |                         }
      |                         ~           
a.cc:17:29: error: expected ';' before '}' token
   17 |                         db++
      |                             ^
      |                             ;
   18 |                 }
      |                 ~            
a.cc:21:20: error: 's' was not declared in this scope
   21 |                 if(s[i]!='B'){
      |                    ^
Language: C++

#include <stdio.h> int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include <stdio.h> int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}
      |                    ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <stdio.h>int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}

Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}
      |                       ^~~~
a.cc:1:10: fatal error: stdio.h>in: No such file or directory
    1 | #include <stdio.h>int main() { int N; scanf("%d", &N); printf("%d\n", N*(N+1)/2); return 0;}
      |          ^~~~~~~~~~~~
compilation terminated.
Language: C++

include <stdio.h>

int main() {
	
	int a, sum = 0;
	scanf("%d", &a);
	float var = 2;
	int sn = a / var * (2 * 1 + (a - 1) * 1);
	printf("%d\n", sn);
	
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <stdio.h>
      | ^~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int a,sum = 0;
	scanf("%d",&a); // 3
	int sn = a / double(2)* (2 * 1 + (a-1) * 1);
	printf("%d",sn);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected expression before 'double'
    6 |         int sn = a / double(2)* (2 * 1 + (a-1) * 1);
      |                      ^~~~~~
Language: C++

#include <stdio.h>
int main(){
int un;
scanf("%d",&un);
int res=0;
for(int i=1;i<=n;i++){
	res+=i
}
printf("%d",res);
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: 'n' was not declared in this scope
    6 | for(int i=1;i<=n;i++){
      |                ^
a.cc:7:15: error: expected ';' before '}' token
    7 |         res+=i
      |               ^
      |               ;
    8 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n;
    cin >> n;
    cout << n(n+1)/2;

    return 0;
      
}





Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'n' cannot be used as a function
   10 |     cout << n(n+1)/2;
      |             ~^~~~~
Language: C++

#include<iostream>
 using namespace std;

 int main(){
    int N, i, n=0;
    cin >> N;
    for (i1; i<N; i++){
        n += i + 1;
    }
    cout << n << endl;
    return 0;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'i1' was not declared in this scope; did you mean 'i'?
    7 |     for (i1; i<N; i++){
      |          ^~
      |          i
Language: Java

import.java.util.Scanner;
public class Main{
    public static void main (String [] args) {
         Scanner input = new Scanner (System.in);
         int student;
         System.out.println("Enter the number of Students");
         int sum =0;
         for (int i = 0; i<=students; i++)
            {
               sum +=i;
               System.out.println("The number of candies needed is " +sum);
             }
         }
} 

Compiler output:
Main.java:1: error: <identifier> expected
import.java.util.Scanner;
      ^
1 error
Language: Java


public class candles {

	public static void main(String[] args) {
		import java.util.*;
		public class reverse {

			public static void main(String[] args) {
				
				Scanner input = new Scanner(System.in);
		     	int n=input.nextInt(),sum=0;
		     	 
		    for(int i=1;i<=n;i++)
		    {
		    	sum=sum+i;
			}
		    	System.out.println("the sum of all candles is " + sum);
			}
			}

	}

}

	}

Compiler output:
Main.java:5: error: illegal start of expression
		import java.util.*;
		^
Main.java:5: error: <identifier> expected
		import java.util.*;
		                 ^
Main.java:5: error: illegal start of expression
		import java.util.*;
		                  ^
Main.java:6: error: illegal start of expression
		public class reverse {
		^
Main.java:23: error: class, interface, enum, or record expected
}
^
5 errors
Language: Java


public static void main(String[] args) {
		
Scanner input = new Scanner(System.in);
int n=input.nextInt(),sum=0;
     	  for(int i=1;i<=n;i++)
    {
    	sum=sum+i;
    }
    	       System.out.println("the sum of all candles is " + sum);
        }
} 

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:12: error: class, interface, enum, or record expected
} 
^
2 errors
Language: Java


import java.util.Scanner;

public class B {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n;
        int sum = 0;
        n = input.nextInt();
        if (n == 1) {
            System.out.print("1\nOnly one child. The answer is 1 in this case.\n");
        } else if (1 < n && n <= 6) {
            for (int i = 1; i <= n; i++) {
                sum = sum + i;
            }

            System.out.print(sum + "\nThe answer is ");
            for (int i = 1; i <= n; i++) {
                System.out.print(i + " + ");
            }
            System.out.println(" = " + sum);
        } else {
            if (6 < n) {
                for (int i = 1; i <= n; i++) {
                    sum = sum + i;
                }
                System.out.printf("%d\nThe sum of the integers from 1 to %d is %d. \n", sum, n, sum);
            }
        }

    }
}

Compiler output:
Main.java:4: error: class B is public, should be declared in a file named B.java
public class B {
       ^
1 error
Language: Java

import java.util.*;
public class reverse {

	public static void main(String[] args) {
		
		Scanner input = new Scanner(System.in);
     	int n=input.nextInt(),sum=0;
     	 
    for(int i=1;i<=n;i++)
    {
    	sum=sum+i;
	}
    	System.out.println("the sum of all candles is " + sum);
	}
	}

Compiler output:
Main.java:2: error: class reverse is public, should be declared in a file named reverse.java
public class reverse {
       ^
1 error
Language: Java

main
Scanner input = new Scanner(System.in);
int student;
System.out.print("Enter the number of students\n");
student = input.next.Int();
int sum = 0;
for (int i = 0; i<= student; i++)
  { 
    sum += i;
    System.out.println(" the total candies needed is "+sum);
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
main
^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
int student;
^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
System.out.print("Enter the number of students\n");
^
Main.java:5: error: class, interface, enum, or record expected
student = input.next.Int();
^
Main.java:7: error: class, interface, enum, or record expected
for (int i = 0; i<= student; i++)
^
Main.java:7: error: class, interface, enum, or record expected
for (int i = 0; i<= student; i++)
                ^
Main.java:7: error: class, interface, enum, or record expected
for (int i = 0; i<= student; i++)
                             ^
Main.java:10: error: class, interface, enum, or record expected
    System.out.println(" the total candies needed is "+sum);
    ^
Main.java:11: error: class, interface, enum, or record expected
}
^
9 errors
Language: Java

import java.util.Scanner;

public class q1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner input = new Scanner (System.in);
		int Student;
		System.out.println(" Enter the number of Students");
		Student = input.nextInt();
		int sum =0;
		for (int i=0;i<=Student;i++)
			sum+= i;
			System.out.println("the number of candies in total is "+ sum);
			
			
			
			
		}

}


Compiler output:
Main.java:3: error: class q1 is public, should be declared in a file named q1.java
public class q1 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class  {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner input = new Scanner (System.in);
		int Student;
		System.out.println(" Enter the number of Students");
		Student = input.nextInt();
		int sum =0;
		for (int i=0;i<=Student;i++)
			sum+= i;
			System.out.println("the number of candies in total is "+ sum);
			
			
			
			
		}

}


Compiler output:
Main.java:3: error: <identifier> expected
public class  {
            ^
1 error
Language: Java

import java.util.Scanner;

public class q1 {

	public static void main(String[] args) {
		Scanner input = new Scanner (System.in);
		int Student;
		System.out.println(" Enter the number of Students");
		Student = input.nextInt();
		int sum =0;
		for (int i=0;i<=Student;i++)
			sum+= i;
			System.out.println("the number of candies in total is "+ sum);
			
			
			
			
		}

}


Compiler output:
Main.java:3: error: class q1 is public, should be declared in a file named q1.java
public class q1 {
       ^
1 error
Language: Java

main()
Scanner input = new Scanner (System.in);
		int Student;
		System.out.println(" Enter the number of Students");
		Student = input.nextInt();
		int sum =0;
		for (int i=0;i<=Student;i++)
			sum+= i;
			System.out.println("the number of candies in total is "+ sum);

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
main()
^
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
		int Student;
		^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: class, interface, enum, or record expected
		System.out.println(" Enter the number of Students");
		^
Main.java:5: error: class, interface, enum, or record expected
		Student = input.nextInt();
		^
Main.java:7: error: class, interface, enum, or record expected
		for (int i=0;i<=Student;i++)
		^
Main.java:7: error: class, interface, enum, or record expected
		for (int i=0;i<=Student;i++)
		             ^
Main.java:7: error: class, interface, enum, or record expected
		for (int i=0;i<=Student;i++)
		                        ^
Main.java:9: error: class, interface, enum, or record expected
			System.out.println("the number of candies in total is "+ sum);
			^
8 errors
Language: Java

public class main {

	public static void main(String[] args) {
		Scanner input = new Scanner (System.in);
		int Student;
		System.out.println(" Enter the number of Students");
		Student = input.nextInt();
		int sum =0;
		for (int i=0;i<=Student;i++)
			sum+= i;
			System.out.println("the number of candies in total is "+ sum);		
			
		}

}


Compiler output:
Main.java:1: error: class main is public, should be declared in a file named main.java
public class main {
       ^
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner (System.in);
		^
  symbol:   class Scanner
  location: class main
Main.java:4: error: cannot find symbol
		Scanner input = new Scanner (System.in);
		                    ^
  symbol:   class Scanner
  location: class main
3 errors
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		
		int sum = 0;
		for(int i=1;i<=n;i++) {
			sum = sum+i;
		}
		
		System.out.println(sum);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int humanNum = sc.nextInt();
		int count = 0;

		for(int num = 1; num <= humanNum; num++) {
			count += num;
		}

		System.out.println(count);
	}
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt()
      int ans = 0;
		for(int i=1; i<=n; ++i){
          ans = ans + n;
        }
      System.out.println(ans);
	}
}


Compiler output:
Main.java:6: error: ';' expected
		int n = scn.nextInt()
		                     ^
1 error
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      int x = 0;
		int[] a = new int[n+1];
		for(int i=1; i<=a.length; ++i){
          a[0]=0;
			a[i] = a[i-1]+i;
		}
      System.out.println(a[i]);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
      System.out.println(a[i]);
                           ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void (String args[]){
    	Scanner stdIn = new Scanner(System.in);
      	int n = stdIn.nextInt();
      	
     	System.out.println(n*(n+1)/2);
    }
}

Compiler output:
Main.java:4: error: <identifier> expected
	public static void (String args[]){
	                  ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
int sum(int x){
  if(x == 0) return x;
  esle return x + sum(x - 1);
}
int main(){
  int a;
  cin >> a;
  int x = sum(a);
  cout << x;
}

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:10:3: error: 'esle' was not declared in this scope
   10 |   esle return x + sum(x - 1);
      |   ^~~~
a.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#define rep(i, a, n) for(int i = a; i < n; i++)
using namespace std;
int sum(int x){
  if(x == 0) return x;
  esle return x + sum(x - 1)
}
int main(){
  int a;
  cin >> a;
  int x = sum(a);
  cout << x;
}

Compiler output:
a.cc: In function 'int sum(int)':
a.cc:10:3: error: 'esle' was not declared in this scope
   10 |   esle return x + sum(x - 1)
      |   ^~~~
a.cc:11:1: warning: control reaches end of non-void function [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,sum=0;
  cin>>n;
  for(i=0;i<n;i++)
  {
    sum+=i;
  }
  cout<<sum;
  return 0;
}

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

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

int main() {
    int N;
    cin >> N;
    int ans = 0;

    for(int i = 0; i < N; i++) {
        ans += (i + 1)
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before '}' token
   10 |         ans += (i + 1)
      |                       ^
      |                       ;
   11 |     }
      |     ~
Language: C++

int main()
{
    string ss, ans="";
    cin >> ss;
    for(ll i=0;i<ss.size();i++)
    {
 
        if(ss[i]=='1' || ss[i]=='0') ans+=ss[i];
        else
        {
 
            if(ans.size()) ans.pop_back();
        }
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'string' was not declared in this scope
    3 |     string ss, ans="";
      |     ^~~~~~
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> ss;
      |     ^~~
a.cc:4:12: error: 'ss' was not declared in this scope
    4 |     cin >> ss;
      |            ^~
a.cc:5:9: error: 'll' was not declared in this scope
    5 |     for(ll i=0;i<ss.size();i++)
      |         ^~
a.cc:5:16: error: 'i' was not declared in this scope
    5 |     for(ll i=0;i<ss.size();i++)
      |                ^
a.cc:8:38: error: 'ans' was not declared in this scope
    8 |         if(ss[i]=='1' || ss[i]=='0') ans+=ss[i];
      |                                      ^~~
a.cc:12:16: error: 'ans' was not declared in this scope
   12 |             if(ans.size()) ans.pop_back();
      |                ^~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << ans;
      |     ^~~~
a.cc:15:13: error: 'ans' was not declared in this scope
   15 |     cout << ans;
      |             ^~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
 int N;
 cin >> N;
 for (int i = 1; i <= N; i++){
   int s = 0;
   s = s + i;
 }
   cout << s << endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 's' was not declared in this scope
   10 |    cout << s << endl;
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main(void){
 int N;
 cin >> N;
 for (int i = 1; i <= N; i++){
   int s = 0;
   s = s + i;
   
   cout << s << endl;
return 0;
}


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

#include <iostream>
using namespace std;

int main() {
	int n;
  	cin >> n;
  	print((n * (n+1))/2);
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'print' was not declared in this scope; did you mean 'printf'?
    7 |         print((n * (n+1))/2);
      |         ^~~~~
      |         printf
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;cin>>N;
  int sum =o;
  for (int i=1;i<=n;i++){
  sum+=i;}
  cout<<sum;
return 0 ;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'o' was not declared in this scope
    5 |   int sum =o;
      |            ^
a.cc:6:19: error: 'n' was not declared in this scope
    6 |   for (int i=1;i<=n;i++){
      |                   ^
Language: C++

#incliude <iostream>
using namespace std;

int main(){
    int n;
    int t;
    cin>>n;
    for(int i=0;i<n;i++){
        t=t+i;
        i++;
    }
    cout<<t<<endl;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incliude; did you mean #include?
    1 | #incliude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incliude <iostream>
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<t<<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:14: error: 'endl' was not declared in this scope
   12 |     cout<<t<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incliude <iostream>
Language: C++

#incliude <iostream>
using namespace std;

int main(){
    int n;
    int t;
    cin>>n;
    for(int i=0;i<n;i++){
        t=t+i
        i++
    }
    cout<<t<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incliude; did you mean #include?
    1 | #incliude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incliude <iostream>
a.cc:9:14: error: expected ';' before 'i'
    9 |         t=t+i
      |              ^
      |              ;
   10 |         i++
      |         ~     
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<t<<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:14: error: 'endl' was not declared in this scope
   12 |     cout<<t<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incliude <iostream>
Language: C++

#incliude <iostream>
using namespace std;

int main(){
    int n;
    int t;
    cin>>n;
    for(int i=0;i<n;i++){
        t=t+i
        i++
    }
    cout<<a<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incliude; did you mean #include?
    1 | #incliude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incliude <iostream>
a.cc:9:14: error: expected ';' before 'i'
    9 |         t=t+i
      |              ^
      |              ;
   10 |         i++
      |         ~     
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout<<a<<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:11: error: 'a' was not declared in this scope
   12 |     cout<<a<<endl;
      |           ^
a.cc:12:14: error: 'endl' was not declared in this scope
   12 |     cout<<a<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incliude <iostream>
Language: C++

#include<iostream>
using namespace std;
int main () 
{
int sum=o,i,n;
cin>>n;
for( i=1;i<n;i++)
{
sum=sum+i;
}
cout<<sum<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'o' was not declared in this scope
    5 | int sum=o,i,n;
      |         ^
a.cc:6:6: error: 'n' was not declared in this scope
    6 | cin>>n;
      |      ^
a.cc:7:6: error: 'i' was not declared in this scope
    7 | for( i=1;i<n;i++)
      |      ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  int sum = 0;
  for(int i = 1; i<= n ;i++){
    sum+=i;
  }
  cout << sum <<< endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected primary-expression before '<' token
   14 |   cout << sum <<< endl;
      |                 ^
Language: Java

import java.util.Scanner;

public class ABC043_A {
    public static void main (String[] args) {

        int sum = 0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        for(int i = 0; i <= n; i++) {

            sum += i;

        }

        System.out.println(sum);

    } 
}

Compiler output:
Main.java:3: error: class ABC043_A is public, should be declared in a file named ABC043_A.java
public class ABC043_A {
       ^
1 error
Language: C

#include<iostream>
using namespace std;
int main()
{
   int s=0,t,i;
   cin>>t;
   for(i=1;i<=t;i++)
   {
       s=s+i;
   }
   cout<<s<<endl;


}


Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc+.h>
using namespace std;
int main (void){
  int n ;
  cin >> n ;
  int c=0;
  for(int i=0; i <= n ; i++){
    c = c +i;
  }
  cout << c ;
}


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>
using namespace std;
int main (void){
  int n ;
  cin >> n ;
  int c=0;
  for(int i=0; i < n ; i++){
    c = c +i;
  }
  cout << c ;
}

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 <stdio.h>

int main(){
  	int n;
	if(scanf("%d", &n) == 1){};
  	print("%d", (n * (n + 1) / 2));
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |         print("%d", (n * (n + 1) / 2));
      |         ^~~~~
      |         printf
Language: C

#include <stdio.h>

int main(){
  	int n;
	if(scanf(%d, &n) == 1){};
  	printf("%d", (n * (n + 1) / 2));
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before '%' token
    5 |         if(scanf(%d, &n) == 1){};
      |                  ^
Language: C

#include <stdio.h>

int main(){
  	int n;
	if(scanf(%d, &n) == 1){};
  	print("%d", (n * (n + 1) / 2));
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before '%' token
    5 |         if(scanf(%d, &n) == 1){};
      |                  ^
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |         print("%d", (n * (n + 1) / 2));
      |         ^~~~~
      |         printf
Language: C

#include <stdio.h>

int main(){
  	int n;
	if(scanf(%d, n) == 1){};
  	print("%d", (n * (n + 1) / 2))
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before '%' token
    5 |         if(scanf(%d, n) == 1){};
      |                  ^
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |         print("%d", (n * (n + 1) / 2))
      |         ^~~~~
      |         printf
main.c:6:39: error: expected ';' before '}' token
    6 |         print("%d", (n * (n + 1) / 2))
      |                                       ^
      |                                       ;
    7 | }
      | ~
Language: C

#include <stdio.h>

int main(){
  	int a;
	if(scanf(%d, n) == 1){};
  	print("%d", (n * (n + 1) / 2))
}

Compiler output:
main.c: In function 'main':
main.c:5:18: error: expected expression before '%' token
    5 |         if(scanf(%d, n) == 1){};
      |                  ^
main.c:6:9: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |         print("%d", (n * (n + 1) / 2))
      |         ^~~~~
      |         printf
main.c:6:22: error: 'n' undeclared (first use in this function)
    6 |         print("%d", (n * (n + 1) / 2))
      |                      ^
main.c:6:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:39: error: expected ';' before '}' token
    6 |         print("%d", (n * (n + 1) / 2))
      |                                       ^
      |                                       ;
    7 | }
      | ~
Language: C++

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

int main(){
 int N;
 cin>> N;
 count =0;
  for(int i=0;i<N+1;i++){
   count +=i;
  }

   count<< count <<endl;

rerturn 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: overloaded function with no contextual type information
    7 |  count =0;
      |         ^
a.cc:9:12: error: overloaded function with no contextual type information
    9 |    count +=i;
      |            ^
a.cc:12:9: error: invalid operands of types '<unresolved overloaded function type>' and '<unresolved overloaded function type>' to binary 'operator<<'
   12 |    count<< count <<endl;
      |    ~~~~~^~~~~~~~
a.cc:14:1: error: 'rerturn' was not declared in this scope
   14 | rerturn 0;
      | ^~~~~~~
Language: Java

import java.util.Scanner;
 
public class Main{
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  int S=N*(N+1)/2;
  public static void main(String[] args){
    System.out.println(S);
  }
}
 

Compiler output:
Main.java:8: error: non-static variable S cannot be referenced from a static context
    System.out.println(S);
                       ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
  int N;
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  int S=N*(N+1)/2;
  public static void main(String[] args){
    System.out.println(S);
  }
}
   

Compiler output:
Main.java:6: error: variable N is already defined in class Main
  int N =sc.nextInt();
      ^
Main.java:9: error: non-static variable S cannot be referenced from a static context
    System.out.println(S);
                       ^
2 errors
Language: Java

import java.util.Scanner;
 
public class Main{
  int N;
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  int S=N*(N+1)/2
  public static void main(String[] args){
    System.out.println(S);
  }
}
                       

Compiler output:
Main.java:7: error: ';' expected
  int S=N*(N+1)/2
                 ^
1 error
Language: Java

import java.util.Scanner;
 
public class Main{
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println(N*(N+1)/2);
  }
}
                       

Compiler output:
Main.java:8: error: non-static variable N cannot be referenced from a static context
    System.out.println(N*(N+1)/2);
                       ^
Main.java:8: error: non-static variable N cannot be referenced from a static context
    System.out.println(N*(N+1)/2);
                          ^
2 errors
Language: Java

import java.util.Scanner;
 
public class Main{
  int N;
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1))/2);
  }
}
                       

Compiler output:
Main.java:6: error: variable N is already defined in class Main
  int N =sc.nextInt();
      ^
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                        ^
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                           ^
3 errors
Language: Java

import java.util.Scanner;
 
public class Main{
 
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1))/2);
  }
}
                       

Compiler output:
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                        ^
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                           ^
2 errors
Language: Java

import java.util.scanner;
 
public class Main{
 
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1))/2);
  }
}
                       

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:5: error: cannot find symbol
  Scanner sc = new Scanner(System.in);
  ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
  Scanner sc = new Scanner(System.in);
                   ^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                        ^
Main.java:9: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                           ^
5 errors
Language: Java

import java.util.Scanner;
 
public class Main{
  Main();
  
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1))/2);
  }
}
                       

Compiler output:
Main.java:4: error: missing method body, or declare abstract
  Main();
  ^
Main.java:10: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                        ^
Main.java:10: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                           ^
3 errors
Language: Java

import java.util.scanner;
 
public class Main{
  Main();
  
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1))/2);
  }
}
                       

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:6: error: cannot find symbol
  Scanner sc = new Scanner(System.in);
  ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: missing method body, or declare abstract
  Main();
  ^
Main.java:6: error: cannot find symbol
  Scanner sc = new Scanner(System.in);
                   ^
  symbol:   class Scanner
  location: class Main
Main.java:10: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                        ^
Main.java:10: error: non-static variable N cannot be referenced from a static context
    System.out.println((N*(N+1))/2);
                           ^
6 errors
Language: Java

import java.util.scanner;

public class Main{
  Main();
  
  Scanner sc = new Scanner(System.in);
  int N =sc.nextInt();
  
  public static void main(String[] args){
    System.out.println((N*(N+1)/2);
  }
}
                       

Compiler output:
Main.java:10: error: ')' or ',' expected
    System.out.println((N*(N+1)/2);
                                  ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,n, sum=0;
cin>>n;
for(i=n; i<=100; i++){
sum=sum+i}
cout<<sum;
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected ';' before '}' token
    8 | sum=sum+i}
      |          ^
      |          ;
a.cc: At global scope:
a.cc:12:1: error: expected unqualified-id before 'return'
   12 | return 0;
      | ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

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

int suming(n){
    if(n == 0){
        return 0;
    }
return n+(suming(n-1));
}

int main(){
 int N ,ans;
 cin >> N;
 ans = suming(N);
 cout << ans << endl;

}

Compiler output:
a.cc:5:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 | int suming(n){
      |            ^
      |            yn
a.cc: In function 'int main()':
a.cc:15:14: error: 'suming' cannot be used as a function
   15 |  ans = suming(N);
      |        ~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
int S=0;  
int N;
cin >> N;

  for(i=0; i<N; i++) {
    S += i;
  }
  
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0; i<N; i++) {
      |       ^
Language: Java

import java.util.Scanner;
public class Solution
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		String ans = "";

		for (int i=0;i<str.length();i++)
		{
			char c = str.charAt(i);
			if (c=='0')
				ans = ans+'0';
			else if (c=='1')
				ans = ans+'1';
			else if (c=='B')
			{
				if (str.length()==0)
					continue;
				else
					str = str.substring(0,str.length());
			}
		}

		System.out.print(ans);
	}
}

Compiler output:
Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution
       ^
1 error
Language: Java

class Main {
    public static void main(String[] args) {
        int a ;
        Scanner input =  new Scanner(System.in);
        a=input.nextInt();


        System.out.println(a*(a+1)/2);
    }
}

Compiler output:
Main.java:4: error: cannot find symbol
        Scanner input =  new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner input =  new Scanner(System.in);
                             ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

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

int main() {
  int n;
  int ans;
  for (int i = 1; i <= n; i++) {
    ans += n;
  }
  cout << ans << endl;
}

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

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

int32_t main()
{
  int n;
  cin>>n;
  cout<<n*(n+1)/2<<endl;
  
 return 0; 
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesspace'
    2 | using namesspace std;
      |       ^~~~~~~~~~
a.cc: In function 'int32_t main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>n;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<n*(n+1)/2<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<n*(n+1)/2<<endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;
import java.lang.*; 
class Main{
	public static void main(String[] args){
		Scanner in=new Scanner (System.in);
		int s=0;
	int n=in.nextInt;
	
	for(int i=1;i<=n;i++)
	{
		s=s+i;
	}
	System.out.println(s);
	
	}
	
}

Compiler output:
Main.java:7: error: cannot find symbol
	int n=in.nextInt;
	        ^
  symbol:   variable nextInt
  location: variable in of type Scanner
1 error
Language: C

#include<stdio.h>

int main()
{
 int n,i,s=0;

 scanf("%d",&ni);
 for(i=1;i<=n;i++)
  s=s+i;

 printf("%d\n",s);

 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: 'ni' undeclared (first use in this function); did you mean 'i'?
    7 |  scanf("%d",&ni);
      |              ^~
      |              i
main.c:7:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main()
{
 int n,i,s=0;

 scanf("%d",&n);
 for(i=1;i<=n;i++)
  s=s+i;

 printf("%d\n",s);

 return 0
}

Compiler output:
main.c: In function 'main':
main.c:13:10: error: expected ';' before '}' token
   13 |  return 0
      |          ^
      |          ;
   14 | }
      | ~
Language: C++

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

int main() {
  int n, sum;
  cin >> n;
  
  for(int i=0; i>n; i++)
  {
    sum = sum+n
  }
  cout << sum;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected ';' before '}' token
   10 |     sum = sum+n
      |                ^
      |                ;
   11 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) // rep(i, 1, 5) --> {1,2,3,4} // rep(i, 5, 1) --> {4,3,2,1} // rep(it, end(v), begin(v)) --> *it

using namespace std;

int main()
{
  int n;
  ci >> n;
  cout << n*(n+1)/2;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'ci' was not declared in this scope
   10 |   ci >> n;
      |   ^~
Language: C++

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

int main() {
  string s,S;
  cin >> s ;
  
  for(int i=0;i<s.size();i++){
    if(s.at(i) == '0'){
      S = S + '0';
    }
    
    else if(s,at(i) == '1'){
      S = S + '1';
    }
    
    else{
      S.at(S.size()--) = '';
    }
  }
  
  cout << S << endl;
}


Compiler output:
a.cc:18:26: error: empty character constant
   18 |       S.at(S.size()--) = '';
      |                          ^~
a.cc: In function 'int main()':
a.cc:13:15: error: 'at' was not declared in this scope
   13 |     else if(s,at(i) == '1'){
      |               ^~
a.cc:18:18: error: lvalue required as decrement operand
   18 |       S.at(S.size()--) = '';
      |            ~~~~~~^~
Language: Java

import java.util.*;
public class Main{
  public void main(String[] args){
    Scanner sc = new Scanner(System.in);
    // 整数の入力
    int N = sc.nextInt();
    // 合計の計算
    sum
    for (int i=1; i<=N; i++) {
      sum += i;
    }
    // 出力
    System.out.println(sum);
  }
}

Compiler output:
Main.java:8: error: not a statement
    sum
    ^
Main.java:8: error: ';' expected
    sum
       ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int i = 0;
      if(n == 1){
        System.out.println(1);
      }else{
      	for(i = 1 ; n-1 ;){
       	 i + i++;
      	}
      }
	}
}

Compiler output:
Main.java:12: error: not a statement
       	 i + i++;
       	   ^
1 error
Language: Java

public class Main {
  public static void main(String[] args){    
    Scanner sc = new Scanner(System.in);
    System.out.println((sc.nextInt()*(sc.nextInt()+1))/2);
  }
}


Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {
  public static void main(String[] args){    
    Scanner sc = new Scanner(System.in);
    System.out.println((sc.nextInt()*(sc.nextInt()+))/2);
  }
}


Compiler output:
Main.java:4: error: illegal start of expression
    System.out.println((sc.nextInt()*(sc.nextInt()+))/2);
                                                   ^
1 error
Language: C++

#include<iostream>
using namespace std;

int facctorialMethod(int k);

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

  int facctorialMethod(int k){
    int sum = 1;
    
    for (int i = 1; i <= k; ++i){  
        sum *= i;
    }
    return sum;
  }
  
  cout << facctorialMethod(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: a function-definition is not allowed here before '{' token
   10 |   int facctorialMethod(int k){
      |                              ^
Language: C++

#include<iostream>
using namespace std;

int facctorialMethod(int k);

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

  int facctorialMethod(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
  }
  
  cout << facctorialMethod(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: a function-definition is not allowed here before '{' token
   10 |   int facctorialMethod(int k){
      |                              ^
Language: C++

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

int main () {
  int N;
  cin >> N;
  
  int answer = N!;
  
  cout << answer << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ',' or ';' before '!' token
    8 |   int answer = N!;
      |                 ^
Language: C++

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

int main () {
  int N;
  cin >> N;
  
  cout << N! << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before '!' token
    8 |   cout << N! << endl;
      |            ^
      |            ;
Language: C++

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

int main() {
  int N;
  cin >> N;
  cout << (1+N)N/2 << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected ';' before 'N'
    7 |   cout << (1+N)N/2 << endl;
      |                ^
      |                ;
Language: C++

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i ,n) for(int i = 0 ; i < (n) ; i ++ )
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using vin=vector<int>;
const int inf=1e9+7;
const ll INF=1e18;


int main() {
 string s;
  cin>>s;
  int n=s.size();
  /////
  
  rep(i,n){
    if(s[i]=='0'){
      a.push_back(0);
    }
    if(s[i]=='1'){ 
      a.push_back(1);
    }
    else{
      a.pop_back();
    }
  }
  int b=a.size();
  rep(u,b){
   cout<<a[u];
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'a' was not declared in this scope
   20 |       a.push_back(0);
      |       ^
a.cc:23:7: error: 'a' was not declared in this scope
   23 |       a.push_back(1);
      |       ^
a.cc:26:7: error: 'a' was not declared in this scope
   26 |       a.pop_back();
      |       ^
a.cc:29:9: error: 'a' was not declared in this scope
   29 |   int b=a.size();
      |         ^