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

int main() {
  int a;
  int ans = 0;
  for (int i = 0; i < n; ++i) {
  scanf("%d", &a[i]);
  }
  for (int x = 0; x < a[0]+1; ++x) {
    int w1 = a[0]*x;
    if(w1>a[3]) {
    break
    }
    else{
        for (int y = 0; y < a[1]+1; ++y) {
        int w2 = w1 + a[1]*y
        if(w2>a[3]){
        break
        }
        else{
            for (int z = 0; z < a[2]+1; ++z) {
            int w3 = w2 + a[2]*z
            if(w3>a[3]){
            break
                if(w3 == a[3]){
                    ans+=1}
                }
            }
            }
        }
    }
  }
  printf("%d\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:23: error: 'n' was not declared in this scope
    4 |   for (int i = 0; i < n; ++i) {
      |                       ^
a.cc:5:17: error: invalid types 'int[int]' for array subscript
    5 |   scanf("%d", &a[i]);
      |                 ^
a.cc:5:3: error: 'scanf' was not declared in this scope
    5 |   scanf("%d", &a[i]);
      |   ^~~~~
a.cc:7:24: error: invalid types 'int[int]' for array subscript
    7 |   for (int x = 0; x < a[0]+1; ++x) {
      |                        ^
a.cc:8:15: error: invalid types 'int[int]' for array subscript
    8 |     int w1 = a[0]*x;
      |               ^
a.cc:9:12: error: invalid types 'int[int]' for array subscript
    9 |     if(w1>a[3]) {
      |            ^
a.cc:10:10: error: expected ';' before '}' token
   10 |     break
      |          ^
      |          ;
   11 |     }
      |     ~     
a.cc:13:30: error: invalid types 'int[int]' for array subscript
   13 |         for (int y = 0; y < a[1]+1; ++y) {
      |                              ^
a.cc:14:24: error: invalid types 'int[int]' for array subscript
   14 |         int w2 = w1 + a[1]*y
      |                        ^
a.cc:31:3: error: 'printf' was not declared in this scope
   31 |   printf("%d\n", ans);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
Language: Java

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int g = sc.nextInt();
        int b = sc.nextInt();
        int n = sc.nextInt();

        int result = 0;
        for(int ir = 0; ir <= n; ir+=r ) {
        	if(ir <n) {
        		for(int ig = ir; ig <= n; ig +=g) {
        			if(ig < n) {
        				for(int ib = ig ; ib <= n ; ib+=b) {
        					if(ib == n) {
        						result++;
        					}
        				}
        			}else {
        				if(ig == n) {
        					result++;
        				}
        			}
        		}
        	}else {
        		if(ir == n) {
        			result++;
        		}
        	}
        }
        System.out.print(result);
        sc.close();
    }
}

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

#include <iostream>
using namespace std;

int main(void){
    int l, i=0, a[4],ans;
    while(cin>>l){
        a[i] = l;
        cout << a[i];
        i++;
    }

    for (i=0 , i <= a[3]/a[0],i++){
        for (j=0,j<=a[3]/a[1],j++){
            if ((a[3] - a[0]*i - a[1]*j)%B == 0 ||  a[3] - a[0]*i - a[1]*j >= 0){
                ans ++;
            }
        }
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: expected ';' before ')' token
   12 |     for (i=0 , i <= a[3]/a[0],i++){
      |                                  ^
      |                                  ;
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:19:17: error: expected ')' before '}' token
   19 |     cout << ans;
      |                 ^
      |                 )
   20 | }
      | ~                
a.cc:12:9: note: to match this '('
   12 |     for (i=0 , i <= a[3]/a[0],i++){
      |         ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C

#include <stdio.h>
 
int main(void) {
    int R, G, B, N;
    scanf("%d %d %d %d", &R, &G, &B, &N);
    int counter = 0;
    for(int r = 0; r < int(N / R) + 1; r++) {
        for(int g = 0; g < int(N / G) + 1; g++) {
            if ((N - R * r - G * g) % B ==0) {
                int b = int((N - R * r - G * g) / B);
                if (b >= 0) {
                    counter += 1;
                }
            }
        }
    }
    printf("%d", counter);
}

Compiler output:
main.c: In function 'main':
main.c:7:24: error: expected expression before 'int'
    7 |     for(int r = 0; r < int(N / R) + 1; r++) {
      |                        ^~~
main.c:8:28: error: expected expression before 'int'
    8 |         for(int g = 0; g < int(N / G) + 1; g++) {
      |                            ^~~
main.c:10:25: error: expected expression before 'int'
   10 |                 int b = int((N - R * r - G * g) / B);
      |                         ^~~
Language: C++

#include<iostream>

using namespace std;

int main() {
	int R, G, B, n;
	cin >> R >> G >> B >> n;
	int cnt = 0;
	for (int i = 0;i < n / R + 1;i++) {
		for (int j = 0;j < (n - i * R) / G + 1;j++) {
			if ((n - i * R - j * G) % B == 0 && (n - i * R - j * G) / B >= 0) {
				cnt++;
			}
		}
	}
	cout << cnt;

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected '}' at end of input
   16 |         cout << cnt;
      |                     ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int l, i=0, a[4],ans;
    while(cin>>l){
        a[i] = l;
        cout << a[i];
        i++;
    }

    for (i=0 , i <= a[3]/a[0],i++){
        for (j=0,j<=a[3]/a[1],j++){
            if ((a[3] - a[0]*i - a[1]*j)%B == 0 ||  a[3] - a[0]*i - a[1]*j >= 0){
                ans ++
            }
        }
    }
    cout << ans
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: expected ';' before ')' token
   12 |     for (i=0 , i <= a[3]/a[0],i++){
      |                                  ^
      |                                  ;
a.cc:19:16: error: expected ';' before '}' token
   19 |     cout << ans
      |                ^
      |                ;
   20 | }
      | ~               
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
a.cc:19:16: error: expected ')' before '}' token
   19 |     cout << ans
      |                ^
      |                )
   20 | }
      | ~               
a.cc:12:9: note: to match this '('
   12 |     for (i=0 , i <= a[3]/a[0],i++){
      |         ^
a.cc:20:1: error: expected primary-expression before '}' token
   20 | }
      | ^
Language: C

#include <studio.h>

int main(void) {
    int R, G, B, N;
scanf("%d %d %d %d", R, G, B, N);
int counter = 0;
for(int r = 0; r < int(N / R) + 1; r++) {
    for(int g = 0; g < int(N / G) + 1; g++) {
        if ((N - R * r - G * g) % B ==0) {
            b = int((N - R * r - G * g) / B);
            if (b >= 0) {
                counter += 1;
            }
printf("%d", counter);
}


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

#include<iostream>
using namespace std;
int main(void) {

	int r, g, b, n,ans=0;
	cin >> r >> g >> b >> n;
	int rr = 0, gr = 0, br = 0;

	for (rr = n / r; rr != -1; rr--) {
		for (gr = n / g; gr != -1; gr--) {
			for (br = n / b; br != -1; br--) {
				if (rr*r + gr * g + br * b - n == 0) {
					ans++;
					break;
				}
			}
		}
	}
	cout << ans << endl;

}

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

int main()
{
    int R, G, B, N, n = 0, c, e;
    cin >> R >> G >> B >> N;
    for (int i = 0; i < N / R + 1; i++)
    {
        c = N - i * R;
        for (int j = 0; j < c / G + 1; j++)
        {
            e = c - j * G;
            for (int k = 0; k < e / B + 1; k++)
            {
                if (k * B == e)
                {
                    n++;
                }
            }
        }
    }
    cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> R >> G >> B >> N;
      |     ^~~
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << n << endl;
      |     ^~~~
a.cc:20:18: error: 'endl' was not declared in this scope
   20 |     cout << n << endl;
      |                  ^~~~
Language: C++


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>

using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {


	ll dp[5][1000000];

	vector<ll> coin_amount(3);
	vector<ll> coin_value(3);

	coin_value[0] = 500;
	coin_value[1] = 100;
	coin_value[2] = 50;

	//空白があってもいい感じに読み込んでくれる
	for (size_t i = 0; i < 3; ++i) {
		scanf_s("%d", &coin_amount[i]);
	}
	int n;
	scanf_s("%d", &n);
	//printf("%d\n", n);

	for (size_t i = 0; i < 5; i++) {
		for (size_t j = 0; j <1000000; j++) {
			dp[i][j] = 0;

		}

	}
	dp[0][0] = 1;
	for (size_t i = 0; i < 3; i++) {
		for (size_t j = 0; j < 1000000; j++) {
			dp[i + 1][j] += dp[i][j];
			for (size_t k = 1; k <= coin_amount[i]; k++) {

				if (j >= k) {
					dp[i + 1][j] += dp[i][j - k];
				}


			}

		}
	}
	printf("%d\n", dp[3][n]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   39 |                 scanf_s("%d", &coin_amount[i]);
      |                 ^~~~~~~
      |                 scanf
a.cc:42:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   42 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: C++

// C++ implementation to count ways 
// to sum up to a given value N 
#include <bits/stdc++.h> 

using namespace std; 

// function to count the total 
// number of ways to sum up to 'N' 
int countWays(int arr[], int m, int N) 
{ 
	int count[N + 1]; 
	memset(count, 0, sizeof(count)); 
	
	// base case 
	count[0] = 1; 
	
	// count ways for all values up 
	// to 'N' and store the result 
	for (int i = 1; i <= N; i++) 
		for (int j = 0; j < m; j++) 

			// if i >= arr[j] then 
			// accumulate count for value 'i' as 
			// ways to form value 'i-arr[j]' 
			if (i >= arr[j]) 
				count[i] += count[i - arr[j]]; 
	
	// required number of ways 
	return count[N]; 
	
} 

// Driver code 
int main() 
{ 
  	int r,g,b,N;
  	cin>>r>>g>>b>>N;
	int arr[] ={r,g,b};
	int m = sizeof(arr) / sizeof(arr[0]); 
	int N = 7; 
	cout<< countWays(arr, m, N); 
	return 0; 
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:40:13: error: redeclaration of 'int N'
   40 |         int N = 7;
      |             ^
a.cc:36:19: note: 'int N' previously declared here
   36 |         int r,g,b,N;
      |                   ^
Language: C++



// ConsoleApplication1.cpp : アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"

#include <list>
#include <iostream>

using namespace std;

/*
#include<iostream>
using namespace std;
int main()
{

int n;
scanf_s("%d", &n);
//printf("%d\n", n);

vector<ll> values(n);
vector<ll> answer_candidate(n);
//空白があってもいい感じに読み込んでくれる
for (size_t i = 0; i < values.size(); ++i) {
scanf_s("%d", &values[i]);
}
//char型(stringの各要素など)をintへ
int ctoi(char c) {
if (c >= '0' && c <= '9') {
return c - '0';
}
return 0;
}
    
//intをstringに
to_string(str);

  return 0;
  
  //要素数100、すべての値に0をセット
  vector<int> vec(100);
  //ちなみにディープコピーとなる
  //vec1の要素をすべてコピー
  vector<int> vec5(vec1);

  //vec1[1]からvec[3]手前までをコピー
  vector<int> vec6(vec1.begin() + 1, vec1.begin() + 3);
  //vectorの要素アクセスは名前[添え字]で．atは例外処理があって重い

  //二次元配列も可
  vector<vector<int>> vec{
  { 1, 2, 3 },
  { 4, 5, 6 }
  };
  //サイズ
  vec.size()
  //空か?
  vec.empty()
  //末尾に追加
  vec.emplace_back(1);
  //先頭に追加(注：stringにはない)
  v.emplace(v.begin(), "A");
  //末尾を削除
  vec_pop_back();
  //途中への挿入は遅いので注意 下記は1番目の手前に挿入(先頭は0番)
  vec.insert(vec.begin() + 1, 99);
  //途中の削除も遅い(引数を2つ指定すると範囲削除)
  vec.erase(vec.begin() + 1, vec.end() - 1);
  //min,max
  int max = *max_element(vec.begin(), vec.end());

  //stringの最後は空白文字なので文字列の最後の文字はstr.back();で取得．

  //ソート
  sort(card.begin(), card.end(), greater<int>());

  // n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
  template<typename A, size_t N, typename T>
  void Fill(A (&array)[N], const T &val){
  std::fill( (T*)array, (T*)(array+N), val );
  }

  }
    
}

//string 長さ
size_t length(const std::string& str) {
return str.length();
}

*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>

using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main() {


	ll dp[5][1000000];

	vector<ll> coin_amount(3);
	vector<ll> coin_value(3);

	coin_value[0] = 500;
	coin_value[1] = 100;
	coin_value[2] = 50;

	//空白があってもいい感じに読み込んでくれる
	for (size_t i = 0; i < 3; ++i) {
		scanf("%d", &coin_amount[i]);
	}
	int n;
	scanf("%d", &n);
	//printf("%d\n", n);

	for (size_t i = 0; i < 5; i++) {
		for (size_t j = 0; j <1000000; j++) {
			dp[i][j] = 0;

		}

	}
	dp[0][0] = 1;
	for (size_t i = 0; i < 3; i++) {
		for (size_t j = 0; j < 1000000; j++) {
			dp[i + 1][j] += dp[i][j];
			for (size_t k = 1; k <= coin_amount[i]; k++) {

				if (j >= k) {
					dp[i + 1][j] += dp[i][j - k];
				}


			}

		}
	}
	printf("%d\n", dp[3][n]);
	return 0;
}

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

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

int main() {
    int r, g, b;
    int n;
    int count = 0;
    int sum;
    cin >> r >> g >> b;
    cin >> n;
    
    for (int i = 0;; i++)
    {   
        sum = i*r;
        if (sum > n) break;
        for (int j = 0;; j++)
        {
            sum = i*r + j*g;
            if (sum > n) break;
            for (int k = 0;; k++)
            { 
                sum = i*r + j*g + k*b; 
                if ( sum > n) break;
                if (n == sum
                {
                    count++;
                }
            }
            
        }
        
    }
    
    cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:29: error: expected ')' before '{' token
   24 |                 if (n == sum
      |                    ~        ^
      |                             )
   25 |                 {
      |                 ~            
a.cc:28:13: error: expected primary-expression before '}' token
   28 |             }
      |             ^
Language: C++

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

int main(void){
    int R, G, B, N, r, g, b, n;
	int r = 0;
    int g = 0;
	int b = 0;
	int n = 0;
	int inter;
	for (; r < (N / R); r++){
        for (; g < (N - R * (N / R)); g++){
			inter = N - G *((N - R * (N / R)) / G);
			if (inter % B == 0){
				n++;
				continue;
			}else{
				continue;
			}
		}
	}
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: redeclaration of 'int r'
    6 |         int r = 0;
      |             ^
a.cc:5:21: note: 'int r' previously declared here
    5 |     int R, G, B, N, r, g, b, n;
      |                     ^
a.cc:7:9: error: redeclaration of 'int g'
    7 |     int g = 0;
      |         ^
a.cc:5:24: note: 'int g' previously declared here
    5 |     int R, G, B, N, r, g, b, n;
      |                        ^
a.cc:8:13: error: redeclaration of 'int b'
    8 |         int b = 0;
      |             ^
a.cc:5:27: note: 'int b' previously declared here
    5 |     int R, G, B, N, r, g, b, n;
      |                           ^
a.cc:9:13: error: redeclaration of 'int n'
    9 |         int n = 0;
      |             ^
a.cc:5:30: note: 'int n' previously declared here
    5 |     int R, G, B, N, r, g, b, n;
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 
int r, g, b, N, cnt = 0;
  cin >> r >> g >> b >> N;
    if(i * r + j * g > N) break;  
  for(int i = 0;i <= N / r;i++){
    for(int j = 0;j <= N / g;j++){

      for(int k = 0;k <= N / b;k++){
        if(i * r + j * g + k * b == N) cnt++;
      }
    }
  }
  
  cout << cnt << endl;
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'i' was not declared in this scope
    8 |     if(i * r + j * g > N) break;
      |        ^
a.cc:8:16: error: 'j' was not declared in this scope
    8 |     if(i * r + j * g > N) break;
      |                ^
a.cc:8:27: error: break statement not within loop or switch
    8 |     if(i * r + j * g > N) break;
      |                           ^~~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int r, g, b, n;
    cin >> r >> g >> b >> n;
    

    vector<int> colors{r,g,b};
    sort(colors.begin(), colors.end());
    vector<vector<int>> cs(3, vector<int> (3001));
    for (int j =0; j < colors.size(); ++j) {
        cs[j][colors[j]]++;
    }

    for (int i = 1; i <= n; ++i) {
        for (int j =0; j < colors.size(); ++j) {
            cs[0][i] += cs[j][max(i-colors[0],0)];
        }
        cs[1][i] += cs[1][max(i-colors[1],0)];
        cs[1][i] += cs[2][max(i-colors[1],0)];
        cs[2][i] += cs[2][max(i-colors[2],0)];
    }
    cout << cs[0][n] + cs[1][n] + cs[2][n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |     sort(colors.begin(), colors.end());
      |     ^~~~
      |     short
Language: C++

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

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

using namespace std;

unsi gojoho(unsi A, unsi B) {
	unsi R = 1;
	if (A > B) {
		while (R!=0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

uni gojoho(uni A, uni B) {
	uni R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

unli gojoho(unli A, unli B) {
	unli R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

int gojoho(int A, int B) {
	int R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}



int main(){
	int R, G, B, N;
	int r_max;
	//int gcdRB;
	int	ans=0;
	bool b=false;
	scanf_s("%d", &R); 
	scanf_s("%d", &G); 
	scanf_s("%d", &B); 
	scanf_s("%d", &N);
	r_max = N / R;
	//gcdRB = gojoho(R, B);
	for (int i = 0; i <= r_max; i++) {
		int t = N - i * R;
		int b_max = t / B;
		for (int j = 0; j <= b_max; j++){
			int s = t - j * B;
			if (s%G==0){
				ans = ans + 1;
			}
		}

	}
	printf("%d", ans);
	return(0);
}






Compiler output:
a.cc: In function 'int main()':
a.cc:97:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   97 |         scanf_s("%d", &R);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
using namespace std;
 
int main(){
  int R,G,B,N;
  cin >> R >> G >> B >> N;
  int ans = 0;
  for (int i=0; i<=3001-R; ++i) {
    for (int j=0; j<=3001-G; ++j) {
      int diff = N - (i*R + j*G);
      if ((diff>=0)&&(diff%B==0) {
          ++ans;
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
        
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:33: error: expected ')' before '{' token
   11 |       if ((diff>=0)&&(diff%B==0) {
      |          ~                      ^~
      |                                 )
a.cc:14:5: error: expected primary-expression before '}' token
   14 |     }
      |     ^
Language: C

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

int main() {

  int R, G, B, N, count, rest;
  cin >> R >> G >> B >> N;
  int ma, mid, mi;
  ma = max(R, max(G, B));
  mi = min(R, min(G, B));
  mid = R + G + B - ma - mi;
  for(int i=0; i<N/ma+1; i++) {
    for (int j=0; j<N/mid+1; j++) {
      rest = N - ma * i - mid * j;
      if (rest % mi == 0 && rest >= 0) {
        count += 1;
      }
    }
  }
  cout << count << endl;
  return 0;
}

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

R,G,B,N = map(int,input().split())
g = 0
c = 0
r,g,b = 0,0,0
for i in range(0,N//R+1):
    sr = i*R
    for j in range(0,N//G+1):
        sg = j*G
        if sr + sg <= N:
            sb = N - sr - sg
            if sb % B == 0:
                c += 1
print(c)

Compiler output:
a.cc:1:1: error: 'R' does not name a type
    1 | R,G,B,N = map(int,input().split())
      | ^
Language: C++

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

typedef long long ll;
typedef unsigned short int unsi;
typedef unsigned int uni;
typedef unsigned long int unli;

using namespace std;

unsi gojoho(unsi A, unsi B) {
	unsi R = 1;
	if (A > B) {
		while (R!=0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

uni gojoho(uni A, uni B) {
	uni R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

unli gojoho(unli A, unli B) {
	unli R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}

int gojoho(int A, int B) {
	int R = 1;
	if (A > B) {
		while (R != 0) {
			R = A % B;
			A = B;
			B = R;
		}
		return A;
	} else {
		while (R != 0) {
			R = B % A;
			B = A;
			A = R;
		}
		return B;
	}
}



int main(){
	int R, G, B, N;
	int r_max;
	int gcdRB;
	int	ans=0;
	bool b=false;
	scanf_s("%d", &R); 
	scanf_s("%d", &G); 
	scanf_s("%d", &B); 
	scanf_s("%d", &N);
	r_max = N / R;
	gcdRB = gojoho(R, B);
	for (int i = 0; i <= r_max; i++) {
		int t = N - i * R;
		int b_max = t / B;
		for (int j = 0; j <= b_max; j++){
			int s = t - j * B;
			if (s%G==0){
				ans = ans + 1;
			}
		}

	}
	printf("%d", ans);
	return(0);
}

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

#include<stdio.h>
#define rep(i,n) for(i=0;i<n;i++)
int main()
{
  int r,g,b,n,count=0;
	scanf("%d%d%d%d",&r,&g,&b,&n);
	rep(i,n)
    {
        rep(j,n){
            rep(k,n){
                if(i*r+j*g+k*b==n)
                {count++;}
                else if(i*r>=n && j*g>=n|| i*r>=n && k*b>=n||j*g>n && k*b>n)
                {break;}
                else {continue;}
        }
        }
    }
printf("%d",count);
return 0;
}
      

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'i' undeclared (first use in this function)
    7 |         rep(i,n)
      |             ^
main.c:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(i=0;i<n;i++)
      |                      ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
    7 |         rep(i,n)
      |             ^
main.c:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(i=0;i<n;i++)
      |                      ^
main.c:9:13: error: 'j' undeclared (first use in this function)
    9 |         rep(j,n){
      |             ^
main.c:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(i=0;i<n;i++)
      |                      ^
main.c:10:17: error: 'k' undeclared (first use in this function)
   10 |             rep(k,n){
      |                 ^
main.c:2:22: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(i=0;i<n;i++)
      |                      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define out(ans) cout << ans << endl;

int main(){

    int r,g,b,n;
    cin >>r >>g >>b >>n;
    int ans=0;
    int rm=floor(n/r)+1;
    rep(rm){
        int gm =floor(n- r*i/g)+1;
        int rr=r*i;
        for (int j=0;j<(gm);j++){
            int gg=g*j;
            int bm = floor(n- r*i-g*j/b)+1;
            for(int k=0; k<(bm); k++){
                if( rr+gg+b*k==n ){
                    ans=ans+1;
                }
            }
        }
    }
    out(ans)
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'rep' was not declared in this scope
   11 |     rep(rm){
      |     ^~~
Language: Java

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int g = sc.nextInt();
        int b = sc.nextInt();
        int n = sc.nextInt();
        int a = n/r;
        int bb = n/g;
        int c = n/b;
        int sum=0;
        for(int i = 0;i<=a;i++){
            for(int j=0;j<=bb;j++){
                for (int k=0;k<=c;k++){
                    int goukei =(r*i)+(g*j)+(b*k);
                    if(goukei==n){
                        sum++;
                        if(goukei>n) {
                            break;
                        }
                    }
                    if(goukei>n){
                        break;
                    }
                }
                if(goukei>n){
                    break;
                }
            }
        }
        System.out.println(sum);
    }
}

Compiler output:
Main.java:29: error: cannot find symbol
                if(goukei>n){
                   ^
  symbol:   variable goukei
  location: class Main
1 error
Language: C++

#include<iostream>
#include<vector>
using namespace std;

int main(void){
  int r,g,b,k;

  cin >> r >> g >> b >> k;
  int temp1, temp2;
  int num = 0;
  for(int x=0;x<k+1;x++){
    temp1 = k - r*x;
    //cout << 'x' << x<<endl;
    for(int y=0;y<temp1+1;y++){
      temp2 = temp1 - g*y;
      //cout << 'y' << y <<endl;
      for(int z=0;z<temp2+1;z++){
        //cout << 'z' << z <<endl;
        if(z*b > k)
          continue;
        if(k == x*r + y*g + z*b){
          //cout << "itti"<< endl;
          //cout << "x:"<<x<< " y:" << y << " z:" << z << endl;
          //cout << '\n';
          num++;
        }   
      }   
    }   
  }
  cout <<  num << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:30:24: error: expected '}' at end of input
   30 |   cout <<  num << endl;
      |                        ^
a.cc:5:15: note: to match this '{'
    5 | int main(void){
      |               ^
Language: C++

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

int main() {
  int r,g,b,n;
  cin>>r>>g>>b>>n;
  if(n%r==0){
    int a=n/r;
  }
  else if(n%r!=0){
    int a=0;
  }
  else if(n%g==0){
    int c=n/g;
  }
  else if(n%g!=0){
    int c=0;
  }
  else if(n%b==0){
    int d=n/b;
  }
  else if(n%b!=0){
    int d=0;
  }
  else if(r!=g&&r>g){
    int e=(n-r)/g;
  }
  else if(r!=g&&r<g){
    int e=(n-g)/r;
  }
  else if(r!=b&&r>b){
    int f=(n-r)/b;
  }
  else if(r!=b&&r<b){
    int f=(n-b)/r;
  }
  else if(g!=b&&g>b){
    int g=(n-g)/b;
  }
  else if(g!=b&&g<b){
    int g=(n-b)/g;
  }
  cout<<a+c+d+e+f+g<<endl;
  
}




Compiler output:
a.cc: In function 'int main()':
a.cc:43:9: error: 'a' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |         ^
a.cc:43:11: error: 'c' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |           ^
a.cc:43:13: error: 'd' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |             ^
a.cc:43:15: error: 'e' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |               ^
a.cc:43:17: error: 'f' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |                 ^
Language: C++

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

int main() {
	int R, G, B, N;
	cin >> R >> G >> B >> N;
	int count = 0;
	for (int r = 0; r < N / R + 1; r++) {
		for (int g = 0; g < (N - r * R) / G + 1; g++) {
			for (int b = 0; b < (N - r * R - g * G) / B + 1; b++) {
				int ord = N - r * R - g * G;
				if (ord%B != ) {
					break;
				}
				else if(N == r*R + g*G + b*B) {
						count++;
				}
				ord /= B;
			}
		}
	}
	cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:46: error: expected primary-expression before ')' token
   12 |                                 if (ord%B != ) {
      |                                              ^
Language: C++


#include <iostream>

using namespace std;

int main(){
    int R,G,B,N;
    int tmp = 0;
    cin >> R >> G >> B >> N;
    for(int i = 0;i < N/R;i++){
        for(int j = 0;j < N/G;j++){
            for(int k = 0;k < N/B;k++){
                if(i * R + j * G + K * B == N){
                    tmp++;
                }
            }
        }
    }
    cout << tmp << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:36: error: 'K' was not declared in this scope
   13 |                 if(i * R + j * G + K * B == N){
      |                                    ^
Language: C++

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

int main() {
  int r,g,b,n;
  cin>>r>>g>>b>>n;
  if(n%r==0){
    int a=n/r;
  }
  else if{
    int a=0;
  }
  else if(n%g==0){
    int c=n/g;
  }
  else if{
    int c=0;
  }
  else if(n%b==0){
    int d=n/b;
  }
  else if{
    int d=0;
  }
  else if(r!=g&&r>g){
    int e=(n-r)/g;
  }
  else if(r!=g&&r<g){
    int e=(n-g)/r;
  }
  else if(r!=b&&r>b){
    int f=(n-r)/b;
  }
  else if(r!=b&&r<b){
    int f=(n-b)/r;
  }
  else if(g!=b&&g>b){
    int g=(n-g)/b;
  }
  else if(g!=b&&g<b){
    int g=(n-b)/g;
  }
  cout<<a+c+d+e+f+g<<endl;
  
}




Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected '(' before '{' token
   10 |   else if{
      |          ^
      |          (
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else if(n%g==0){
      |   ^~~~
a.cc:16:10: error: expected '(' before '{' token
   16 |   else if{
      |          ^
      |          (
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else if(n%b==0){
      |   ^~~~
a.cc:22:10: error: expected '(' before '{' token
   22 |   else if{
      |          ^
      |          (
a.cc:25:3: error: 'else' without a previous 'if'
   25 |   else if(r!=g&&r>g){
      |   ^~~~
a.cc:43:9: error: 'a' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |         ^
a.cc:43:11: error: 'c' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |           ^
a.cc:43:13: error: 'd' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |             ^
a.cc:43:15: error: 'e' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |               ^
a.cc:43:17: error: 'f' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |                 ^
Language: C++

#include <stdio.h>
#include <string.h>
#include <ctype.h>
//#include <DEBUG.h>
#ifndef LL
#define LL long long
#endif
#ifndef uLL
#define uLL unsigned long long
#endif
#ifndef uL
#define uL unsigned int
#endif
#ifndef iL
#define iL int
#endif
#ifndef iS
#define iS short
#endif
#ifndef uS
#define uS unsigned short
#endif
#ifndef uC
#define uC unsigned char
#endif
#define max(a,b) (((a)>(b))?(a):(b))
#define min(a,b) (((a)<(b))?(a):(b))
#define abs(a) (((a)<0)?(-(a)):(a))
#define sgn(a) (((a)<0)?(1):(0))
#define movs(a,b,l) (memmove((a),(b),sizeof(*(b))*(l)))
#define stosb(a,b,l) (memset((a),(b),sizeof(*(a))*(l)))
LL num[100000],ans[3007][3007];
int main()
{
	LL a,b,c,i,j,k,n,m;
	for (i=1;i<=3;i++)
	{
		scanf("%lld",&num[i]);
	}
	scanf("%lld",&n);
	for (i=0;i<=3;i++)
	{
		for (j=0;j<=n;j++)
		{
			ans[i][j]=0;
		}
	}
	ans[0][0]=1;
	for (i=1;i<=3;i++)
	{
		ans[i][0]=1;
		for (j=1;j<num[i];j++)
		{
			ans[i][j]=ans[i-1][j];
		}
		for (;j<=n;j++)
		{
			ans[i][j]=ans[i-1][j]+ans[i][j-num[i]];
		}
		print64(ans[i],n+1);
	}
	//printf("%lld\n",ans[3][n]);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:60:17: error: 'print64' was not declared in this scope; did you mean 'printf'?
   60 |                 print64(ans[i],n+1);
      |                 ^~~~~~~
      |                 printf
Language: C++

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

int main() {
  int r,g,b,n;
  cin>>r>>g>>b>>n;
  if(n%r==0){
    int a=n/r;
  }
  else{
    int a=0;
  }
  else if(n%g==0){
    int c=n/g;
  }
  else{
    int c=0;
  }
  else if(n%b==0){
    int d=n/b;
  }
  else{
    int d=0;
  }
  else if(r!=g&&r>g){
    int e=(n-r)/g;
  }
  else if(r!=g&&r<g){
    int e=(n-g)/r;
  }
  else if(r!=b&&r>b){
    int f=(n-r)/b;
  }
  else if(r!=b&&r<b){
    int f=(n-b)/r;
  }
  else if(g!=b&&g>b){
    int g=(n-g)/b;
  }
  else if(g!=b&&g<b){
    int g=(n-b)/g;
  }
  cout<<a+c+d+e+f+g<<endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else if(n%g==0){
      |   ^~~~
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else if(n%b==0){
      |   ^~~~
a.cc:25:3: error: 'else' without a previous 'if'
   25 |   else if(r!=g&&r>g){
      |   ^~~~
a.cc:43:9: error: 'a' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |         ^
a.cc:43:11: error: 'c' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |           ^
a.cc:43:13: error: 'd' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |             ^
a.cc:43:15: error: 'e' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |               ^
a.cc:43:17: error: 'f' was not declared in this scope
   43 |   cout<<a+c+d+e+f+g<<endl;
      |                 ^
Language: C

#include<stdio.h>

int main(void)
{
  int r=0;
  int g=0;
  int b=0;
  int n=0;
  int c=0;
  
  scanf("%d" , &r);
  scanf("%d" , &g);
  scanf("%d" , &b);
  scanf("%d" , &n);
  
  for(int i=0;i<=n/r ; i++)
   {for(int j=0; j<=(n-i*r)/g ; j++)
    {for(int k=0; k<=(n-i*r-j*g)/b ; k++)
     {if((n-i*r-j*g)%n==0)
      {c++;} 
    }
   }
  }
    printf("%d" , c)
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:21: error: expected ';' before 'return'
   24 |     printf("%d" , c)
      |                     ^
      |                     ;
   25 |   return 0;
      |   ~~~~~~
Language: C++

#include <stdio.h>
#include <iostream>
using namespace std;
int main(){

int R,G,B,N;

cin >> R >> G >>B>>N ;

int count = 0;

int r=0;
while (R*r<=N){
    int g=0
    while (g*G+R*r<=N){
        if (N-r*R-g*G)%B==0:
            int b=(N-r*R-g*G)/B
            if (0<=b){
                count +=1
            }
                
            else{
                break
            }
            
        g += 1
    r += 1

    }

}
cout << count << endl;   


return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'while'
   15 |     while (g*G+R*r<=N){
      |     ^~~~~
Language: C++

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

int main() {
  int R,G,B,n,ans = 0;
  cin >> R >> G >> B >> n;
  if((n%R != 0 && n%G != 0) && n%B != 0){
    ans = 0;
  }
  elese{
   if(R == G && R == B){
     ans = (n/R+2+n/R+1)/2;
   }
   else{
    for(int r = 0;r <= n/R;r++){
     for(int g = 0;g <= n/G;g++){
      for(int b = 0;b <= n/B;b++){
        if(R*r+G*g+B*b == n){
          ans++;
        }
      }
     }
    }
   }
  }
  cout << ans << endl;
}


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

#include <bits/stdc++.h>

#define int long long
#define MOD 1000000007

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(i) (i).begin(), (i).end()
#define rall(i) (i).begin(), (i).end(), greater<int>()
using namespace std;

#define elif else if
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define fst first
#define sec second
template <typename T>
void print(T x)
{
    std::cout << x << '\n';
}

//typedef long long ll;
#define TENNINE 1000000005
#define TENFIVE 100005
//#define int long long

int R, G, B, N;

signed main()
{
    cin >> R >> G >> B >> N;

    int r = ceil(N / R);
    int g = ceil(N / G);
    int b = ceil(N / B);

    int ans = 0;

    rep(i, r + 1)
    {
        rep(j, g + 1)
        {
            if (N < (i * R + j * G))
            {
                break;
            }
            rep(s, b + 1)
            {

                int temp = i * R + j * G + s * B;
                if (temp == N)
                {
                    ans++;
                    break;
                }
            }
        }
    }
}

cout << ans << endl;

return 0;
}


Compiler output:
a.cc:66:1: error: 'cout' does not name a type
   66 | cout << ans << endl;
      | ^~~~
a.cc:68:1: error: expected unqualified-id before 'return'
   68 | return 0;
      | ^~~~~~
a.cc:69:1: error: expected declaration before '}' token
   69 | }
      | ^
Language: C++

//package TaskB;

import java.io.FileInputStream;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    int R,G,B,N;
    void solve() throws Exception {
        Scanner sc = new Scanner(System.in);
        R = sc.nextInt(); G = sc.nextInt(); B=sc.nextInt(); N = sc.nextInt();
        int[][] dp = new int[4][N+1];
        for(int i=0; i<4; i++){
            for(int j=0; j<N+1; j++){
                dp[i][j] = 0;
            }
        }

        dp[0][0] = 1;
        for(int i=0; i*R<=N; i++){
            dp[0][i*R] = 1;
        }

        dp[1][0] = 1;
        for(int i=1; i<=N; i++){
            for(int j=0; j*G<=i; j++){
                dp[1][i] += dp[0][i-j*G];
            }
        }

        dp[2][0] = 1;
        for(int i=1; i<=N; i++){
            for(int j=0; j*B<=i; j++){
                dp[2][i] += dp[1][i - j*B];
            }
        }

        System.out.println(dp[2][N]);


    }

    public static void main(String[] args) throws Exception{
        //System.setIn(new FileInputStream("inputs/b.in"));
        Main s = new Main();
        s.solve();
    }
}


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

#include <bits/stdc++.h>

#define int long long
#define MOD 1000000007

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define all(i) (i).begin(), (i).end()
#define rall(i) (i).begin(), (i).end(), greater<int>()
using namespace std;

#define elif else if
#define eb emplace_back
#define pb push_back
#define mp make_pair
#define fst first
#define sec second
template <typename T>
void print(T x)
{
    std::cout << x << '\n';
}

//typedef long long ll;
#define TENNINE 1000000005
#define TENFIVE 100005
//#define int long long

int R, G, B, N;

signed main()
{
    cin >> R >> G >> B >> N;

    int r = ceil(N / R);
    int g = ceil(N / G);
    int b = ceil(N / B);

    int ans = 0;

    rep(i, r + 1)
    {
        rep(j, g + 1)
        {
            if (N < (i * R + j * G))
            {
                break;
            }
            rep(s, b + 1)
            {
            }

            int temp = i * R + j * G + s * B;
            if (temp == N)
            {
                ans++;
                break;
            }
        }
    }
}

cout << ans << endl;

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:40: error: 's' was not declared in this scope
   56 |             int temp = i * R + j * G + s * B;
      |                                        ^
a.cc: At global scope:
a.cc:66:1: error: 'cout' does not name a type
   66 | cout << ans << endl;
      | ^~~~
a.cc:68:1: error: expected unqualified-id before 'return'
   68 | return 0;
      | ^~~~~~
a.cc:69:1: error: expected declaration before '}' token
   69 | }
      | ^
Language: Java

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int r = sc.nextInt();
        int g = sc.nextInt();
        int b = sc.nextInt();
        int n = sc.nextInt();
        int a = n/r;
        int bb = n/g;
        int c = n/b
        int sum=0;
        for(int i = 0;i<=a;i++){
            for(int j=0;j<=bb;j++){
                for (int k=0;k<=c;k++){
                    int goukei =(r*i)+(g*j)+(b*k);
                    if(goukei==n){
                        sum++;
                    }
                }
            }
        }
        System.out.println(sum);
    }
}

Compiler output:
Main.java:13: error: ';' expected
        int c = n/b
                   ^
1 error
Language: C++

sing namespace std;

int main() {
	int R, G, B, N;
	cin >> R >> G >> B >> N;
	int count = 0;
	for (int r = 0; r < N / R + 2; r++) {
		for (int g = 0; g < (N - r * R) / G + 2; g++) {
			for (int b = 0; b < (N - r * R - g * G) / B + 2; b++) {
				if (N == r*R + g*G + b*B) {
					count++;
				}
			}
		}
	}
	cout << count << endl;
}

Compiler output:
a.cc:1:1: error: 'sing' does not name a type
    1 | sing namespace std;
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> R >> G >> B >> N;
      |         ^~~
a.cc:16:9: error: 'cout' was not declared in this scope; did you mean 'count'?
   16 |         cout << count << endl;
      |         ^~~~
      |         count
a.cc:16:26: error: 'endl' was not declared in this scope
   16 |         cout << count << endl;
      |                          ^~~~
Language: C++

#include <stdio.h>

int GetNum(int n, int a, int b) {
  int ans = 0;
  for (int i = 0; i <= n; i += a) {
    if ((n - i) % b == 0) { ans++; }
  }
  return ans;
}

int main() {
  int r, g, b, n;
  scanf("%d%d%d%d", &r, &g, &b, &n);
  int ans = 0;
  for (int num = 0; num <= n; num += r) {
    ans += GetNum(n - num, g, b);
  }
  printf("%d\n", ans;);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:21: error: expected ')' before ';' token
   18 |   printf("%d\n", ans;);
      |         ~           ^
      |                     )
a.cc:18:22: error: expected primary-expression before ')' token
   18 |   printf("%d\n", ans;);
      |                      ^
Language: C++

#include <utility>
#define ll long long int
#define rep(i,x,y) for(int i=x;i<y;i++)
#define rel(i,x,y) for(int i=x-1;i>=y;i--)
#define all(x) x.begin(),x.end()

using namespace std;

int main(){
	int R,G,B,N;
	int i=0,j=0,k=0;
	cin >> R >> G >> B >> N;
	int cnt = 0;
	rep(i,0,N){
	  rep(j,0,N){
//	while(R*i<=N){
//		while(R*i+G*j<=N){
			if((N-R*i-G*j)%B==0){
				cnt++;
			}
//			j++;
		}
//		i++;
	}
	cout << cnt << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> R >> G >> B >> N;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <utility>
  +++ |+#include <iostream>
    2 | #define ll long long int
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << cnt << endl;
      |         ^~~~
a.cc:25:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:24: error: 'endl' was not declared in this scope
   25 |         cout << cnt << endl;
      |                        ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <utility>
  +++ |+#include <ostream>
    2 | #define ll long long int
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <sstream>
#include <utility>
#define ll long long int
#define rep(i,x,y) for(int i=x;i<y;i++)
#define rel(i,x,y) for(int i=x-1;i>=y;i--)
#define all(x) x.begin(),x.end()

using namespace std;

int main(){
	int R,G,B,N;
	int i=0,j=0,k=0;
	cin >> R >> G >> B >> N;
	int cnt = 0;
	rep(i,0,N){
		rep(j,0,N)
//	while(R*i<=N){
//		while(R*i+G*j<=N){
			if((N-R*i-G*j)%B==0){
				cnt++;
			}
//			j++;
		}
//		i++;
	}
	cout << cnt << endl;


}


Compiler output:
a.cc:31:9: error: 'cout' does not name a type
   31 |         cout << cnt << endl;
      |         ^~~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C++

R, G, B, N = [int(n) for n in input().split()]

count = 0
for r in range(N//R + 1):
    for g in range(N//G + 1):
        if (N - (R * r + G * g)) % B == 0:
            b = (N - (R * r + G * g)) / B
            if  0 <= b <=  N//B:
                count += 1

print(count)

Compiler output:
a.cc:1:1: error: 'R' does not name a type
    1 | R, G, B, N = [int(n) for n in input().split()]
      | ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>

using namespace std;

int main()
{
	int a,b,c,d,cnt=0;
	cin >> a >> b >> c >> d;
	
	
	for(int i=0;i<3001;i++){
		if(a*i >= d)break
		
		for(int j=0;j<3001;j++){
			
			if((d-(a*i + b*j))%c == 0) cnt++;
			
			if(a*i + b*j >= d)break;
		}
	}
	
	
	cout << cnt << endl;
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:34: error: expected ';' before 'for'
   16 |                 if(a*i >= d)break
      |                                  ^
      |                                  ;
   17 | 
   18 |                 for(int j=0;j<3001;j++){
      |                 ~~~