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

#include<iostream>
using namespace std;
int main()
{
    int X;
    cin >> x;
    int A, B;
    cin >> A, B;
    cout << X-(A+B) ;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'x' was not declared in this scope
    6 |     cin >> x;
      |            ^
Language: C

#include<cstdio>
const int MAXN = 20000;
int dp[MAXN + 5];
int main() {
	int a, b, c, X;
	scanf("%d%d%d%d",&a,&b,&c,&X);
	dp[0] = 1;
	for(int i=X;i>=0;i--) {
		for(int j=1;j<=c;j++) {
			if( j * 50 > i ) break;
			dp[i] += dp[i - j*50];
		}
	}
	for(int i=X;i>=0;i--) {
		for(int j=1;j<=b;j++) {
			if( j * 100 > i ) break;
			dp[i] += dp[i - j*100];
		}
	}
	for(int i=X;i>=0;i--) {
		for(int j=1;j<=a;j++) {
			if( j * 500 > i ) break;
			dp[i] += dp[i - j*500];
		}
	}
	printf("%d",dp[X]);
}


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

#include<iostream>
using namespace std;

int main(){
	int X,A,B,Y;
	
	cin >> X;
	cin >> A;
	cin >> B;
	
	Y = (X-A)/B
	
	cout << Y;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before 'cout'
   11 |         Y = (X-A)/B
      |                    ^
      |                    ;
   12 | 
   13 |         cout << Y;
      |         ~~~~
Language: C++

int main() {
  int x, a, b;
  cin >> x >> a >> b;
  x -= a;
  int i;
  for(i = 0; b * i < x; ++i) {

  }
  cout << x - b * i << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> x >> a >> b;
      |   ^~~
a.cc:9:3: error: 'cout' was not declared in this scope
    9 |   cout << x - b * i << endl;
      |   ^~~~
a.cc:9:24: error: 'endl' was not declared in this scope
    9 |   cout << x - b * i << endl;
      |                        ^~~~
Language: C++

  #include<iostream>
  using namespace std;
  int main()
  {
    int a,b,c,x;
    cin>>a>>b>>c>>x;
    int ans = 0;
    for(i = 0; i < a; i++) {
      for(j = 0; j < b; j++) {
        for(k = 0; k < c; k++) {
          if (a * 500 + b * 100 + c * 50 == x) {
            ans++;
          }
        }
      }
    }
    cout << ans << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i = 0; i < a; i++) {
      |         ^
a.cc:9:11: error: 'j' was not declared in this scope
    9 |       for(j = 0; j < b; j++) {
      |           ^
a.cc:10:13: error: 'k' was not declared in this scope
   10 |         for(k = 0; k < c; k++) {
      |             ^
Language: C++

  #include<iostream>
  using namespace std;
  int main()
  {
    int a,b,c,x;
    cin>>a>>b>>c>>x;
    int ans = 0;
    for(i = 0; i < a, i++) {
      for(j = 0; j < b, j++) {
        for(k = 0; k < c, k++) {
          if (a * 500 + b * 100 + c * 50 == x) {
            ans++;
          }
        }
      }
    }
    cout << ans << endl;
    return 0;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'i' was not declared in this scope
    8 |     for(i = 0; i < a, i++) {
      |         ^
a.cc:8:26: error: expected ';' before ')' token
    8 |     for(i = 0; i < a, i++) {
      |                          ^
      |                          ;
a.cc:9:11: error: 'j' was not declared in this scope
    9 |       for(j = 0; j < b, j++) {
      |           ^
a.cc:9:28: error: expected ';' before ')' token
    9 |       for(j = 0; j < b, j++) {
      |                            ^
      |                            ;
a.cc:10:13: error: 'k' was not declared in this scope
   10 |         for(k = 0; k < c, k++) {
      |             ^
a.cc:10:30: error: expected ';' before ')' token
   10 |         for(k = 0; k < c, k++) {
      |                              ^
      |                              ;
Language: Java

import java.util.*;
public class BuyingSweets {
      public static void main(String[]args) {
    	  Scanner scan=new Scanner(System.in);
    	  int x=scan.nextInt();
    	  int a=scan.nextInt();
    	  int b=scan.nextInt();
    	  System.out.print((x-a)%b);
      }
}

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

#include <stdio.h>
using namespace std;
int main()
{
      int X,A,B;
      scanf("%d%d%d",&X,&A,&B);
      if(X>A) printf("%d",(X-A)%B);
      else printf("%d",X);


	return 0;
}


Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
Language: C++

include<bits/stdc++.h>
using namespace std;
int main(){
int x, a, b; cin>>x>>a>>b;
cout<<x-a-b;
return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:14: error: 'cin' was not declared in this scope
    4 | int x, a, b; cin>>x>>a>>b;
      |              ^~~
a.cc:5:1: error: 'cout' was not declared in this scope
    5 | cout<<x-a-b;
      | ^~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int a,b,c,x,ans=0;
	cin>>a>>b>>c>>x;
	if(500*a+100*b+50*c<x)
	{
		cout<<0<<endl;
		return 0;
	}
	for(int i=1;i<=a;i++)
		for(int j=1;j<=b;j++)
			for(int k=1;k<=c;k++)
				if(500*a1+100*b1+50*c1==x)
					ans++;
				else
					continue;
	cout<<ans<<endl;
	return 0;
 } 


Compiler output:
a.cc: In function 'int main()':
a.cc:16:40: error: 'a1' was not declared in this scope; did you mean 'a'?
   16 |                                 if(500*a1+100*b1+50*c1==x)
      |                                        ^~
      |                                        a
a.cc:16:47: error: 'b1' was not declared in this scope; did you mean 'b'?
   16 |                                 if(500*a1+100*b1+50*c1==x)
      |                                               ^~
      |                                               b
a.cc:16:53: error: 'c1' was not declared in this scope; did you mean 'c'?
   16 |                                 if(500*a1+100*b1+50*c1==x)
      |                                                     ^~
      |                                                     c
Language: C++

#include "stdafx.h"
#include<iostream>
#include<vector>
#include<string>
#include<set>
#include<algorithm>
#include<map>
#include<functional>
using namespace std;

int main() {
	int X, A, B;

	cin >> X >> A >> B;

	X -= A;
	X %= B;
	cout << X << endl;

	return 0;
}

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

import java.util.Scanner;

public class Main {
    public static void main(String []args){
        Scanner in = new  Scanner(System.in);
        int x = in.nextInt();
        int a = in.nextInt();
        int b = in.nextInt();
        System.out.println((x - a) - ((x - a) / b) * b);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C

#include <stdio.h>
 
int main()
{
	int a,b,x;
	scanf("%d",x)
	scanf("%d",a)
	scanf("%d",b)
	c=x-a;
	d=c%d;
	printf("%d",d);
 
	return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected ';' before 'scanf'
    6 |         scanf("%d",x)
      |                      ^
      |                      ;
    7 |         scanf("%d",a)
      |         ~~~~~         
main.c:10:9: error: 'd' undeclared (first use in this function)
   10 |         d=c%d;
      |         ^
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:11: error: 'c' undeclared (first use in this function)
   10 |         d=c%d;
      |           ^
Language: C

#include <stdio.h>

void main()
{
	int a,b,x,c,d;
	scanf("%d",&x)
	scanf("%d",&a)
	scanf("%d",&b)
	c=x-a;
	d=c%d;
	printf("%d",d);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:23: error: expected ';' before 'scanf'
    6 |         scanf("%d",&x)
      |                       ^
      |                       ;
    7 |         scanf("%d",&a)
      |         ~~~~~          
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main()
      |      ^~~~
Language: C

#include <stdio.h>

void main()
{
	int a,b,x,c,d;
	scanf("%d",x)
	scanf("%d",a)
	scanf("%d",b)
	c=x-a;
	d=c%d;
	printf("%d",d);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected ';' before 'scanf'
    6 |         scanf("%d",x)
      |                      ^
      |                      ;
    7 |         scanf("%d",a)
      |         ~~~~~         
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main()
      |      ^~~~
Language: C

#include <stdio.h>

void main()
{
	int a,b,x;
	scanf("%d",x)
	scanf("%d",a)
	scanf("%d",b)
	c=x-a;
	d=c%d;
	printf("%d",d);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected ';' before 'scanf'
    6 |         scanf("%d",x)
      |                      ^
      |                      ;
    7 |         scanf("%d",a)
      |         ~~~~~         
main.c:10:9: error: 'd' undeclared (first use in this function)
   10 |         d=c%d;
      |         ^
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:11: error: 'c' undeclared (first use in this function)
   10 |         d=c%d;
      |           ^
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main()
      |      ^~~~
Language: C

#include <stdio.h>

void main()
{
	scanf("%d",x)
	scanf("%d",a)
	scanf("%d",b)
	c=x-a;
	d=c%d;
	printf("%d",d);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:20: error: 'x' undeclared (first use in this function)
    5 |         scanf("%d",x)
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:22: error: expected ';' before 'scanf'
    5 |         scanf("%d",x)
      |                      ^
      |                      ;
    6 |         scanf("%d",a)
      |         ~~~~~         
main.c:9:9: error: 'd' undeclared (first use in this function)
    9 |         d=c%d;
      |         ^
main.c:9:11: error: 'c' undeclared (first use in this function)
    9 |         d=c%d;
      |           ^
main.c:12:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |         return 0;
      |                ^
main.c:3:6: note: declared here
    3 | void main()
      |      ^~~~
Language: C++

#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{

	int x, a, b;
	int ans;

	cin >> x >> a >> b;

	ans = x-a;
	ans = ans%b;

	cout << ans << endl;

    return 0;
}


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

#include "stdafx.h"
#include <iostream>
using namespace std;


int main()
{

	int x, a, b;
	int ans;

	cin >> x >> a >> b;

	ans = x-a;
	ans = ans%b;

	cout << ans << endl;
	cin >> a;

    return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
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 m = sc.nextInt();
        ArrayList<LinkedList<Tuple>> list = new ArrayList<>();
        for(int i = 0; i <= n; i++) list.add(new LinkedList<>());
        int[] memo = new int[3];
        for (int i = 0; i < m; i++) {
            memo[0] = sc.nextInt();
            memo[1] = sc.nextInt();
            memo[2] = sc.nextInt();
            list.get(memo[0]).add(new Tuple(memo[1], memo[2]));
            list.get(memo[1]).add(new Tuple(memo[0], -memo[2]));
        }
        // DFS
        Stack<Integer> queue = new Stack<>();
        boolean[] visit = new boolean[n + 1];
        int[] distance = new int[n + 1];
        for (int i = 1; i <= n; i++) {
            if (!visit[i]) {
                distance[i] = 0;
                visit[i] = true;
                queue.add(i);
                while (!queue.isEmpty()) {
                    int curr = queue.poll();
                    Iterator<Tuple> it = list.get(curr).iterator();
                    while(it.hasNext()) {
                        Tuple next = it.next();
                        if (!visit[next.x]) {
                            visit[next.x] = true;
                            distance[next.x] = distance[curr] - next.y;
                            queue.add(next.x);
                        } else {
                            if (distance[next.x] != distance[curr] - next.y) {
                                System.out.println("No");
                                return;
                            }
                        }
                    }
                }
            }
        }
        System.out.println("Yes");
    }
 
    static class Tuple {
        final int x;
        final int y;
        Tuple(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }
}

Compiler output:
Main.java:28: error: cannot find symbol
                    int curr = queue.poll();
                                    ^
  symbol:   method poll()
  location: variable queue of type Stack<Integer>
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

int x, a, b
int main() {
	scanf("%d%d%d", &x, &a, &b);
	x -= a;
	printf("%d\n", x  % b);
}

Compiler output:
a.cc:6:1: error: expected initializer before 'int'
    6 | int main() {
      | ^~~
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[]args){
        Scanner scan=new Scanner(System.in);
        int X,A,B=scan.next();
        Y=X-A*100;
        Z=Y-B;
        if (Z>B){
            Z=Z-B;
        }
        System.out.println(Z);


    }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to int
        int X,A,B=scan.next();
                           ^
Main.java:7: error: cannot find symbol
        Y=X-A*100;
        ^
  symbol:   variable Y
  location: class Main
Main.java:8: error: cannot find symbol
        Z=Y-B;
        ^
  symbol:   variable Z
  location: class Main
Main.java:8: error: cannot find symbol
        Z=Y-B;
          ^
  symbol:   variable Y
  location: class Main
Main.java:9: error: cannot find symbol
        if (Z>B){
            ^
  symbol:   variable Z
  location: class Main
Main.java:10: error: cannot find symbol
            Z=Z-B;
            ^
  symbol:   variable Z
  location: class Main
Main.java:10: error: cannot find symbol
            Z=Z-B;
              ^
  symbol:   variable Z
  location: class Main
Main.java:12: error: cannot find symbol
        System.out.println(Z);
                           ^
  symbol:   variable Z
  location: class Main
8 errors
Language: C++

#include<iostream>
int main(void){
  int x,a,b;
  cin >> x >> a >> b;
  cout << ((x-a)%b) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> x >> a >> b;
      |   ^~~
      |   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:5:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   cout << ((x-a)%b) << 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:5:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    5 |   cout << ((x-a)%b) << 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: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		System.out.println((X-A)%B);
	}
}


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: C++

#include <iostream>
#include <algorithm>
#include <string>
 
using namespace std;
int main(void){
    int N,M;
    cin >> N >> M;
    if(M == 0) { cout << "Yes" ; return 0;}
    int L[M],R[M],D[M],x[N];
    for(int i=0;i<M;i++) { cin >> L[i] >> R[i] >> D[i]; }
    for(int i=0;i<N;i++) { x[i] = 0; }
    
    for(int hoge=0;hoge<1000;hoge++){
        for(int i=0;i<M;i++) {
            x[R[i]-1] = x[L[i]-1] + D[i];
            if(x[R[i]-1] > 1000000000) { cout << "No" ; return 0; }
        }
    }
 
    //for(int i=0;i<N;i++) {cout << x[i] << endl;}
    for(int i=0;i<M;i++) {
        if(x[R[i]-1] - x[L[i]-1] != D[i]) { cout << "No" ; return 0; }
    }
    cout << "Yes";
    return 0;
}

Compiler output:
a.cc:4:1: error: extended character   is not valid in an identifier
    4 |  
      | ^
a.cc:20:1: error: extended character   is not valid in an identifier
   20 |  
      | ^
a.cc:4:1: error: '\U000000a0' does not name a type
    4 |  
      | ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |     cin >> N >> M;
      |     ^~~
      |     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:9:18: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     if(M == 0) { cout << "Yes" ; return 0;}
      |                  ^~~~
      |                  std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:42: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |             if(x[R[i]-1] > 1000000000) { cout << "No" ; return 0; }
      |                                          ^~~~
      |                                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:20:1: error: '\U000000a0' was not declared in this scope
   20 |  
      | ^
a.cc:22:17: error: 'i' was not declared in this scope
   22 |     for(int i=0;i<M;i++) {
      |                 ^
a.cc:25:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 |     cout << "Yes";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,b) FOR(i,0,b)
#define INF 1e9

int ame (int j, int N, int a1[N], int a2[N])
{
  int tmp = 0;

  REP(i,j+1) tmp += a1[i];
  FOR(i,j,N) tmp += a2[i];

  return tmp;
}

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

  int a1[N], a2[N];
  REP (i,N) cin>>a1[i];
  REP (i,N) cin>>a2[i];

  REP (j,N) ans = max (ans, ame(j,N,a1,a2));


  cout<<ans<<endl;

  return 0;
}


Compiler output:
a.cc:9:32: error: use of parameter outside function body before ']' token
    9 | int ame (int j, int N, int a1[N], int a2[N])
      |                                ^
a.cc:9:33: error: expected ')' before ',' token
    9 | int ame (int j, int N, int a1[N], int a2[N])
      |         ~                       ^
      |                                 )
a.cc:9:35: error: expected unqualified-id before 'int'
    9 | int ame (int j, int N, int a1[N], int a2[N])
      |                                   ^~~
Language: C++

#include<bits/stdctt.h>
using namespace std;
int main()
{
        int x,a,b,c,s;
        scanf("%d %d %d",&x,&a,&b);
        c=x-a;
        s=c%b;
        printf("%d",s);
        return 0;
}

Compiler output:
a.cc:1:9: fatal error: bits/stdctt.h: No such file or directory
    1 | #include<bits/stdctt.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;
public class buyingsweats {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int x=in.nextInt()-in.nextInt();
        int b=in.nextInt();
        System.out.println(x-(x/b)*b);
    }
}


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

#include<stdio.h>
int main()
{
  long X, A,B,C;
 cin>>X>>A>>B;
if( (1<=A || A<=1000) && (1<=B || B<=1000)
{
 if((A + B) <= X  && X < = 10000 )
{ C = X - A;
C = C%B;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope
    5 |  cin>>X>>A>>B;
      |  ^~~
a.cc:6:43: error: expected ';' before '{' token
    6 | if( (1<=A || A<=1000) && (1<=B || B<=1000)
      |                                           ^
      |                                           ;
    7 | {
      | ~                                          
a.cc:13:1: error: expected primary-expression before 'return'
   13 | return 0;
      | ^~~~~~
a.cc:12:2: error: expected ')' before 'return'
   12 | }
      |  ^
      |  )
   13 | return 0;
      | ~~~~~~
a.cc:6:3: note: to match this '('
    6 | if( (1<=A || A<=1000) && (1<=B || B<=1000)
      |   ^
Language: C++

#include<iostream>
int main()
{
  long X, A,B,C;
 cin>>X>>A>>B;
if( (1<=A || A<=1000) && (1<=B || B<=1000)
{
 if((A + B) <= X  && X < = 10000 )
{ C = X - A;
C = C%B;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:2: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |  cin>>X>>A>>B;
      |  ^~~
      |  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:6:43: error: expected ';' before '{' token
    6 | if( (1<=A || A<=1000) && (1<=B || B<=1000)
      |                                           ^
      |                                           ;
    7 | {
      | ~                                          
a.cc:13:1: error: expected primary-expression before 'return'
   13 | return 0;
      | ^~~~~~
a.cc:12:2: error: expected ')' before 'return'
   12 | }
      |  ^
      |  )
   13 | return 0;
      | ~~~~~~
a.cc:6:3: note: to match this '('
    6 | if( (1<=A || A<=1000) && (1<=B || B<=1000)
      |   ^
Language: C++

#include<iostream.h>
int main()
{
  long X, A,B,C;
 cin>>X>>A>>B;
if( (1<=A || A<=1000) && (1<=B || B<=1000)
{
 if((A + B) <= X  && X < = 10000 )
{ C = X - A;
C = C%B;
}
}
endl;
}

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

#include<stdio.h>
int main(){
int a,b,c,x,k;
k=0;
scanf("%d %d %d %d,&a,&b,&c,&x);
for(int s=0;s<a||s*500<=x;s++){
for(int t=0;t<b||s*500+t*100<=x;t++){
for(int r=0;r<c||s*500+t*100+r*50<=x;r++){
if(s*500+t*100+r*50==x)k++;
}}}
printf("%d",k);
return 0;
}


Compiler output:
a.cc:5:7: warning: missing terminating " character
    5 | scanf("%d %d %d %d,&a,&b,&c,&x);
      |       ^
a.cc:5:7: error: missing terminating " character
    5 | scanf("%d %d %d %d,&a,&b,&c,&x);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:1: error: expected primary-expression before 'for'
    6 | for(int s=0;s<a||s*500<=x;s++){
      | ^~~
a.cc:6:13: error: 's' was not declared in this scope
    6 | for(int s=0;s<a||s*500<=x;s++){
      |             ^
Language: C++

#include<stdio.h>
int main()
{
    int x,a,b;
    scanf("%d%d%d",&x,&a,&b,&cnt);
    x-=a;
    while(x<b)
    {
        x-=b;
    }
    printf("%d",x);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:30: error: 'cnt' was not declared in this scope; did you mean 'int'?
    5 |     scanf("%d%d%d",&x,&a,&b,&cnt);
      |                              ^~~
      |                              int
Language: C

#include <Stdio.h>

int main()
{
    int X,A,B;

    scanf("%d",&X);
    scanf("%d",&A);
    scanf("%d",&B);

    printf("%d\n",X - A - ((X - A)/B)*B);

    return 0;
}

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

import java.io.InputStream;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		InputStream is = System.in;
		solve(is);
	}

	private static void solve(InputStream is) {
		try (Scanner cin = new Scanner(is)) {
			int a = cin.nextInt();
			int b = cin.nextInt();
			int c = cin.nextInt();

			int ans = (a - b) - ((a - b) / c) * c;
			System.out.println(ans);
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.InputStream;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
Language: C++

arr=[]
arr.append(int(raw_input());arr.append(int(raw_input());arr.append(int(raw_input())
print (arr[0]-arr[1])%(arr[2])

Compiler output:
a.cc:1:1: error: 'arr' does not name a type
    1 | arr=[]
      | ^~~
a.cc:2:29: error: 'arr' does not name a type
    2 | arr.append(int(raw_input());arr.append(int(raw_input());arr.append(int(raw_input())
      |                             ^~~
a.cc:2:57: error: 'arr' does not name a type
    2 | arr.append(int(raw_input());arr.append(int(raw_input());arr.append(int(raw_input())
      |                                                         ^~~
Language: C++


import java.util.Scanner;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author rn-sshawish
 */
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        int a = input.nextInt();
        int b = input.nextInt();
        x-= a;
        x= x%b;
        System.out.println(x);
    }
}


Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: expected unqualified-id before 'public'
   14 | public class Main {
      | ^~~~~~
Language: C++


int main(){
  int x,a,b;
  cin>>x>>a>>b;

  x-=a;
  while(x-b>=0)
    x-=b;

  cout<<x<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>x>>a>>b;
      |   ^~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<x<<endl;
      |   ^~~~
a.cc:10:12: error: 'endl' was not declared in this scope
   10 |   cout<<x<<endl;
      |            ^~~~
Language: C++

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <numeric> // accumulate(v.begin(), v.end(), 0)                                                         

using namespace std;
#define ll long long

int main(){
  int X, A, B;
  cin >> X >> A >> B;
  cout << (X - A) % B << endl;b
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: 'b' was not declared in this scope
   14 |   cout << (X - A) % B << endl;b
      |                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n+1); i++)
int main() {
 int A,B,C,X;
 cin>>A>>B>>C>>X;
 int ans=0;
 rep(i,A){
     rep(j,B){
         rep(k,C){
             if(i*500+B*100+C*50==X){
             ans+++
             }
         }  
     }
 }
 cout<<ans<<endl;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: expected primary-expression before '}' token
   16 |              }
      |              ^
Language: Java

mport java.util.*;
 
public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();  
      int b = sc.nextInt();  
      int c = sc.nextInt();  
      int x = sc.nextInt();  
      
      int count=0;
      boolean flag100 = true;
      boolean flag50 = true;
      
      for(int i = 1; i<=a ; i++){
       if(x % (500*i) == 0){
      	count += 1;
       }
        for(int j = 1; j<=b ; j++){
         if(flag100){        
            if(x % (100*j) == 0){
         	    count += 1;
         	    flag100 = false;
            }
         }
         
         if(x % (500*i + 100*j) == 0){
            count += 1;
         }
        	for(int k = 1; k<=c ; k++){
        	    if(flag50){
         		    if(x % (50*k) == 0){
         			    count += 1;
         			    flag50 = false;
        		    }
        	     }
        		 if(x % (500*i + 50*k) == 0){
            		count += 1;
         	     }else if(x % (500*i + 100*j + 50*k) == 0){
            		count += 1;
         	     }     		         
             }   
         }
      }
    System.out.println(count);
  }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a = sc.nextInt();  
      int b = sc.nextInt();  
      int c = sc.nextInt();  
      int x = sc.nextInt();  
      
      int count=0;
      boolean flag100 = true;
      boolean flag50 = true;
      
      for(int i = 1; i<=a ; i++){
       if(x % (500*i) == 0){
      	count += 1;
       }
        for(int j = 1; j<=b ; j++){
         if(flag100){        
            if(x % (100*j) == 0){
         	    count += 1;
         	    flag100 = false;
            }
         }
         
         if(x % (500*i + 100*j) == 0){
            count += 1;
         }
        	for(int k = 1; k<=c ; k++){
        	    if(flag50){
         		    if(x % (50*k) == 0){
         			    count += 1;
         			    flag50 = false;
        		    }
        	     }
        		 if(x % (500*i + 50*k) == 0){
            		count += 1;
         	     }else if(x % (500*i + 100*j + 50*k) == 0){
            		count += 1;
         	     }     		         
             }   
         }
      }
    System.out.println(count);
  }
}
import java.util.*;

public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a sc.nextInt();  
      int b sc.nextInt();  
      int c sc.nextInt();  
      int x sc.nextInt();  
      
      int count=0;
      boolean flag100 = true;
      boolean flag50 = true;
      
      for(int i = 1; i<=a ; i++){
       if(x % (500*i) == 0){
      	count += 1;
       }
        for(int j = 1; j<=b ; j++){
         if(flag100){        
            if(x % (100*j) == 0){
         	    count += 1;
         	    flag100 = false;
            }
         }
         
         if(x % (500*i + 100*j) == 0){
            count += 1;
         }
        	for(int k = 1; k<=c ; k++){
        	    if(flag50){
         		    if(x % (50*k) == 0){
         			    count += 1;
         			    flag50 = false;
        		    }
        	     }
        		 if(x % (500*i + 50*k) == 0){
            		count += 1;
         	     }else if(x % (500*i + 100*j + 50*k) == 0){
            		count += 1;
         	     }     		         
             }   
         }
      }
    System.out.println(count);
  }
}


Compiler output:
Main.java:48: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:53: error: ';' expected
      int a sc.nextInt();  
           ^
Main.java:54: error: ';' expected
      int b sc.nextInt();  
           ^
Main.java:55: error: ';' expected
      int c sc.nextInt();  
           ^
Main.java:56: error: ';' expected
      int x sc.nextInt();  
           ^
5 errors
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int a sc.nextInt();  
      int b sc.nextInt();  
      int c sc.nextInt();  
      int x sc.nextInt();  
      
      int count=0;
      boolean flag100 = true;
      boolean flag50 = true;
      
      for(int i = 1; i<=a ; i++){
       if(x % (500*i) == 0){
      	count += 1;
       }
        for(int j = 1; j<=b ; j++){
         if(flag100){        
            if(x % (100*j) == 0){
         	    count += 1;
         	    flag100 = false;
            }
         }
         
         if(x % (500*i + 100*j) == 0){
            count += 1;
         }
        	for(int k = 1; k<=c ; k++){
        	    if(flag50){
         		    if(x % (50*k) == 0){
         			    count += 1;
         			    flag50 = false;
        		    }
        	     }
        		 if(x % (500*i + 50*k) == 0){
            		count += 1;
         	     }else if(x % (500*i + 100*j + 50*k) == 0){
            		count += 1;
         	     }     		         
             }   
         }
      }
    System.out.println(count);
  }
}

Compiler output:
Main.java:6: error: ';' expected
      int a sc.nextInt();  
           ^
Main.java:7: error: ';' expected
      int b sc.nextInt();  
           ^
Main.java:8: error: ';' expected
      int c sc.nextInt();  
           ^
Main.java:9: error: ';' expected
      int x sc.nextInt();  
           ^
4 errors
Language: C

(A, B, C, X) = [int(input()) for i in range(4)]
ways = 0

max_a = int( X / 500 )
if A < max_a :
  max_a = A
for a in reversed(range( max_a+1 )) :
  max_b = int( (X - 500 * a) / 100 )
  if B < max_b :
    max_b = B
  for b in reversed(range( max_b+1 )) :
    c = int ( ( X - 500 * a - 100 * b ) / 50 )
    if c > C :
      break
    ways += 1
print('%d' %ways ) ;


Compiler output:
main.c:1:3: error: expected ')' before ',' token
    1 | (A, B, C, X) = [int(input()) for i in range(4)]
      |   ^
      |   )
main.c:16:7: warning: multi-character character constant [-Wmultichar]
   16 | print('%d' %ways ) ;
      |       ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
typedef unsigned long long ll;
using namespace std;

int main(void) {
    int A,B,C,X; cin>>A>>B>>C>>X;
    
    int counter = 0;
    for (int a = 0; a <= A; a++) {
        for (int b = 0; b <= B; b++) {
            for (int c = 0; c <= C; c++) {
                if (a*500 + b*100 + c*50 == X) {
                    counter++;
                }
            }
        }
    }
    cout << counter << endl;
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
   21 |     return 0;
      |              ^
a.cc:7:16: note: to match this '{'
    7 | int main(void) {
      |                ^
Language: C++

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

int main() {
    int a, b, c, x;
    cin >> a >> b >> c >> x;

    int amax = min(a, x / 500);
    int bmax = min(b, x / 100);
    int cmax = min(c, x / 50);
    int counter = 0;
    //cout << amax << ' ' << bmax << ' ' << cmax << endl;

    int useda = 0, usedb = 0, usedc = 0;
    while(true) {
        int temp = x - useda * 500;
        usedb = 0;
        usedc = 0;
        while (temp >= 50 && usedc < cmax) {
            temp -= 50;
            usedc++;
        }
        if (usedb == 0 && usedc < cmax) cmax = usedc;
        while (temp >= 100 && usedb < bmax) {
            temp -= 100;
            usedb++;
        }

        if (temp == 0) {
            //cout << useda << ' ' << usedb << ' ' << usedc << endl;
            counter++;
            //if (useda == amax) break;
            else if ((usedb == bmax && usedc == cmax) || usedc == 0) {
                useda++;
                bmax = min(b, x / 100);
                cmax = min(c, x / 50);
                continue;
            } else if (usedb == bmax) bmax -= 5;
            else cmax -= 2;
        } else break;
    }

    cout << counter << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:13: error: expected '}' before 'else'
   33 |             else if ((usedb == bmax && usedc == cmax) || usedc == 0) {
      |             ^~~~
a.cc:29:24: note: to match this '{'
   29 |         if (temp == 0) {
      |                        ^
a.cc:40:11: error: 'else' without a previous 'if'
   40 |         } else break;
      |           ^~~~
a.cc:40:16: error: break statement not within loop or switch
   40 |         } else break;
      |                ^~~~~
a.cc: At global scope:
a.cc:43:5: error: 'cout' does not name a type
   43 |     cout << counter << endl;
      |     ^~~~
a.cc:44:1: error: expected declaration before '}' token
   44 | }
      | ^
Language: Java

import java.util.Scanner; 
public class Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int c=sc.nextInt();
		int x=sc.nextInt();
		int count=0;
		for(int i=0;i<=a;++i) {
			for(int j=0;j<=b;++j) {
				if((x-500*i-100*j)/50>=0 && (x-500*i-100*j)/50<=c ) {
					++count;
				}
			}
		}
		
		System.out.println(count);


Compiler output:
Main.java:19: error: reached end of file while parsing
		System.out.println(count);
		                          ^
1 error
Language: C++

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

int main (){ 
  int A,B,C,X;
  cin >>A>>B>>C>>X;
  int p=0;
  for(int i=A;i>=0;i--){
    for(int j=B;j>=0;j--){
        for(int m=C;C>=0;C--){
          if(X-A*j-B*j-C*m==0) p++;
        }
      }
    }
  }
  cout << p<<endl;
}
             
      
      


Compiler output:
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << p<<endl;
      |   ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: Java

import java.io.*;

public class Main {
  public static void main(String[] args) {
    BufferedReader kbd =
      new BufferedReader(new InputStreamReader(System.in));
    
    int A = kdb.readLine();
    int B = kbd.readLine();
    int C = kbd.readLine();
    int X = kbd.readLine();
    int count = 0;
    int a;
    int b;
    int c;
    int total;
    
    for (a = 0; a <= A; a++) {
      for (b = 0; b <= B; b++) {
        for (c = 0; c <= c; c++) {
          total = 500*a + 100*b + 50*c;
          if (total == X) count++;
        }
      }
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int A = kdb.readLine();
            ^
  symbol:   variable kdb
  location: class Main
Main.java:9: error: incompatible types: String cannot be converted to int
    int B = kbd.readLine();
                        ^
Main.java:10: error: incompatible types: String cannot be converted to int
    int C = kbd.readLine();
                        ^
Main.java:11: error: incompatible types: String cannot be converted to int
    int X = kbd.readLine();
                        ^
4 errors
Language: Java

import java.io.*;

public class Main {
  public static void main(String[] args) {
    BufferedReader sc =
      new BufferedReader(new InputStreamReader(System.in));
    
    int A = sc.nextInt();
    int B = sc.nextInt();
    int C = sc.nextInt();
    int X = sc.nextInt();
    int count = 0;
    int a;
    int b;
    int c;
    int total;
    
    for (a = 0; a <= A; a++) {
      for (b = 0; b <= B; b++) {
        for (c = 0; c <= c; c++) {
          total = 500*a + 100*b + 50*c;
          if (total == X) count++;
        }
      }
    }
    System.out.println(count);
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    int A = sc.nextInt();
              ^
  symbol:   method nextInt()
  location: variable sc of type BufferedReader
Main.java:9: error: cannot find symbol
    int B = sc.nextInt();
              ^
  symbol:   method nextInt()
  location: variable sc of type BufferedReader
Main.java:10: error: cannot find symbol
    int C = sc.nextInt();
              ^
  symbol:   method nextInt()
  location: variable sc of type BufferedReader
Main.java:11: error: cannot find symbol
    int X = sc.nextInt();
              ^
  symbol:   method nextInt()
  location: variable sc of type BufferedReader
4 errors
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int a, b, c, x;
    cin >> a >> b >> c >> x;

    int ans = 0;

    for (int i = 0; i <= a; i++) {
        for (int j = 0; j <= b; j++) {
            for (int k = 0; k <= c; k++) {
                int total = i*500 + j*100 + k*50;
                if (total == x) ++ans;
            }
        }
    } 

    cout << ans << endl;
}#include <iostream>
using namespace std;

int main()
{
    int a, b, c, x;
    cin >> a >> b >> c >> x;

    int ans = 0;

    for (int i = 0; i <= a; i++) {
        for (int j = 0; j <= b; j++) {
            for (int k = 0; k <= c; k++) {
                int total = i*500 + j*100 + k*50;
                if (total == x) ++ans;
            }
        }
    } 

    cout << ans << endl;
}

Compiler output:
a.cc:21:2: error: stray '#' in program
   21 | }#include <iostream>
      |  ^
a.cc:21:3: error: 'include' does not name a type
   21 | }#include <iostream>
      |   ^~~~~~~
a.cc:24:5: error: redefinition of 'int main()'
   24 | int main()
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main()
      |     ^~~~
Language: C++

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <algorithm>
#include <iostream>

using namespace std;

int A, B, C, X;

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

    cin >> A >> B >> C >> X;

    X /= 50;

    int ans = 0;
    for (int a = 0; a <= min(A, X / 10); a++) {
        int rem = X - 10 * a;
        int bmax = min(B, rem / 2);
        int bmin = max(0, min(B, (rem - C + 1) / 2);
        ans += bmax -bmin;
    }
    cout << ans << "\n";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:52: error: expected ')' before ';' token
   25 |         int bmin = max(0, min(B, (rem - C + 1) / 2);
      |                       ~                            ^
      |                                                    )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,x;
  cin>>a>>b>>c>>x;
  int count=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<=b;j++){
      for(int k=0;k<=c;k++){
        int total=i*500+100*j+50*k
          if(total==x){count++;}
      }
    }
  }
  cout<<count<<endl;
}
        


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected ',' or ';' before 'if'
   11 |           if(total==x){count++;}
      |           ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,x;
  cin>>a>>b>>c>>x;
  int x=0;
  for(int i=0;i<=a;i++){
    for(int j=0;j<=b;j++){
      for(int k=0;k<=c;k++){
        int total=i*500+100*j+50*k
          if(total==x){x++;}
      }
    }
  }
  cout<<x<<endl;
}
        

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: redeclaration of 'int x'
    6 |   int x=0;
      |       ^
a.cc:4:13: note: 'int x' previously declared here
    4 |   int a,b,c,x;
      |             ^
a.cc:11:11: error: expected ',' or ';' before 'if'
   11 |           if(total==x){x++;}
      |           ^~
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int a, b,c,x;
  cin >> a >> b >> c >> x;
  int ans = 0;
  forn(i,a+1){
    int f=500*i ;
    forn(j,b+1){
      int g=100*j;
      forn(k,c+1){
        int 50*k;
        if ( f+g+k==x){
          ans++;
        }
      }
    }
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:68:13: error: expected unqualified-id before numeric constant
   68 |         int 50*k;
      |             ^~