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

#include<iostream>
using namespace std;

int main(){
	int N;
	cin>>N;
	int A,B;
	int c=A[0];
	int d=A[1];
	int e=A[2];
	int f=A[3];
	int g=B[0];
	int h=B[1];
	int i=B[2];
	int j=B[3];
	for(c=0;c<10;c++){
		for(d=0;d<10;d++){
			for(e=0;e<10;e++){
				for(f=0;f<10;f++){
					for(g=0;g<10;g++){
						for(h=0;h<10;h++){
							for(i=0;i<10;i++){
								for(j=0;j<10;j++){
	if(N==A+B){
			cout<<c+d+e+f+g+h+i+j<<endl;
		}
	}
}
}
}
}
}
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: invalid types 'int[int]' for array subscript
    8 |         int c=A[0];
      |                ^
a.cc:9:16: error: invalid types 'int[int]' for array subscript
    9 |         int d=A[1];
      |                ^
a.cc:10:16: error: invalid types 'int[int]' for array subscript
   10 |         int e=A[2];
      |                ^
a.cc:11:16: error: invalid types 'int[int]' for array subscript
   11 |         int f=A[3];
      |                ^
a.cc:12:16: error: invalid types 'int[int]' for array subscript
   12 |         int g=B[0];
      |                ^
a.cc:13:16: error: invalid types 'int[int]' for array subscript
   13 |         int h=B[1];
      |                ^
a.cc:14:16: error: invalid types 'int[int]' for array subscript
   14 |         int i=B[2];
      |                ^
a.cc:15:16: error: invalid types 'int[int]' for array subscript
   15 |         int j=B[3];
      |                ^
Language: C++

import java.util.Scanner;

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

		Scanner scan=new Scanner(System.in);

		int n=scan.nextInt();

		int a=0;
		int sum=100000;
		int[][] m=new int[2][5];

		for(a=0;a<=n/2;a++) {
			int a1=a;
			int b1=n-a;
			for(int j=4;j>=0;j--) {
				if(a1/Math.pow(10, j)<1) {
					m[0][j]=0;
				}else {
					m[0][j]=(int)Math.floor(a1/Math.pow(10, j));
					a1-=(int)Math.floor(a1/Math.pow(10, j))*Math.pow(10, j);
				}
				if(b1/Math.pow(10, j)<1) {
					m[1][j]=0;
				}else {
					m[1][j]=(int)Math.floor(b1/Math.pow(10, j));
					b1-=(int)Math.floor(b1/Math.pow(10, j))*Math.pow(10, j);
				}
			}

			int sum1=0;

			for(int k=0;k<5;k++) {
				sum1+=(m[0][k]+m[1][k]);
			}
			if(sum1<sum) {
				sum=sum1;
			}
		}

		System.out.println(sum);
	}

}


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 <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <iostream>
using namespace std;
int DigVal(int n) {

	int s = 0;
	while (n > 0)
	{
		s += n % 10;
		n /= 10;
	}
	return s;
}
void DigitsSum() {
	int N;
	cin >> N;
	int res = INT_MAX;
	int left,right;
	
	for (int i = 1; i < N; i++)
	{
		left = DigVal(i);
		right = DigVal(N - i);
		res = min(left + right, res);
	}
	cout << res;
}

int main() {
	DigitsSum();
	return 0;
}

Compiler output:
a.cc: In function 'void DigitsSum()':
a.cc:25:19: error: 'INT_MAX' was not declared in this scope
   25 |         int res = INT_MAX;
      |                   ^~~~~~~
a.cc:10:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include <cmath>
  +++ |+#include <climits>
   10 | #include <iostream>
Language: C++

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

kakuketa(int x){
    int ans=0;
    while(x){
        ans+=x%10;
        x/=10;
    }
    return ans;
}

int main(){
    int N;
    cin>>N;
    int M=N-1;
    int ans=100000000;
    while(M){
        if(N%10==0){
            ans=10;break;
        }
        ans=min(ans,kakuketa(M)+kakuketa(N-M));
        M/=10;
    }
    cout<<ans<<endl;
    
    return 0;
}


Compiler output:
a.cc:5:1: error: ISO C++ forbids declaration of 'kakuketa' with no type [-fpermissive]
    5 | kakuketa(int x){
      | ^~~~~~~~
Language: C++

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

#include <iostream>
#include <fstream>                        //  ifstream, ofstream

using namespace std;
void mainA() {
	const int Nmin = 2;
	const int Nmax = pow(10, 5);
	int N;
	cin >> N;
	if (Nmin <= N && N <= Nmax);
	else return;
	//
	int minSum = Nmax;
	for (int A = 1; A < N; A++) {
		int B = N - A;
		int a = A;
		int b = B;
		int sum = 0;
		do {
			sum+=a % 10;
			a /= 10;
		} while (a > 0 && minSum>sum);

		do {
			sum += b % 10;
			b /= 10;
		} while (b > 0 && minSum>sum);
		if (minSum > sum)minSum = sum;
	}
	cout << minSum << endl;
	//cout << "end" << endl;
	return ;
}

int main()
{
	mainA();
	return 0;
}



Compiler output:
a.cc: In function 'void mainA()':
a.cc:10:26: error: 'pow' was not declared in this scope
   10 |         const int Nmax = pow(10, 5);
      |                          ^~~
Language: C

#include <stdio.h>

int main()
{
    int N, A,S=0,B;
    scanf("%d",&N);
    T=N;
    while (A!=0)
    {
        B = A % 10;
        S= S+B;
        A= A / 10;
    }

    printf("%d\n",S;

           return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'T' undeclared (first use in this function)
    7 |     T=N;
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:20: error: expected ')' before ';' token
   15 |     printf("%d\n",S;
      |           ~        ^
      |                    )
main.c:17:21: error: expected ';' before '}' token
   17 |            return 0;
      |                     ^
      |                     ;
   18 | }
      | ~
Language: C++

def solve():
    n = int(input())

    ans = 999999
    for a in range(1, -(-n // 2)+1):
        t = digits(a) + digits(n-a)
        if(t < ans):
            ans = t

    print(ans)


def digits(n):
    s = str(n)
    array = list(map(int, list(s)))
    return sum(array)


if __name__ == "__main__":
    solve()


Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def solve():
      | ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,i,sum;
  sum = 0;
  cin >> a;
  for(i=0;i<5;i++){
    sum += a%10;
    a = a/10
  }
  if(sum == 1)
    sum = 10;
  cout << sum << "\n";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected ';' before '}' token
    9 |     a = a/10
      |             ^
      |             ;
   10 |   }
      |   ~
Language: C

#include <stdio.h>


int main(int argc, char **argv)
{
  int n,i,a,b,x,xx,suma,sumb,dig;
  x = 100000;
  sum = 0;
  scanf("%d\n",&n);
  for(i = 0 ; i < n / 2 ; i++){
    a = i + 1;
    b = n - a;
    while(a > 0){
      dig = a % 10;
      suma = suma + dig;
      a = a / 10;
    }
    while(b > 0){
      dig = b % 10;
      sumb = sumb + dig;
      b = b / 10;
    }
    xx = suma + sumb;
    if(x > xx){
      x = xx;
    }
  }
  printf("%d\n",x);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'sum' undeclared (first use in this function); did you mean 'sumb'?
    8 |   sum = 0;
      |   ^~~
      |   sumb
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>


int main(int argc, char **argv)
{
  int n,i,a,b,x,xx,suma,sumb,dig;
  x = 100000;
  sum = 0;
  scanf("%d\n",&n);
  for(i = 0 ; i < n / 2 ; i++){
    a = i + 1;
    b = n - a;
    while(a){
      dig = a % 10;
      suma = suma + dig;
      a = a / 10;
    }
    while(b){
      dig = b % 10;
      sumb = sumb + dig;
      b = b / 10;
    }
    xx = suma + sumb;
    if(x > xx){
      x = xx;
    }
  }
  printf("%d\n",x);

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:3: error: 'sum' undeclared (first use in this function); did you mean 'sumb'?
    8 |   sum = 0;
      |   ^~~
      |   sumb
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>
#include<string.h>
#include<math.h>
#include <stdlib.h>
long n,m,b;
long a=0;
long p=0;
int main(){
scamf(&ld,%n);
while(1){
p++;
b=n%pow(10,p);
a+=b;
n-=b*pow(10,p-1);
if(pow(10,p)>n)break;
}
if(a==1)printf("5");
else {printf("%ld,&a);}
}

Compiler output:
a.cc:18:14: warning: missing terminating " character
   18 | else {printf("%ld,&a);}
      |              ^
a.cc:18:14: error: missing terminating " character
   18 | else {printf("%ld,&a);}
      |              ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:8: error: 'ld' was not declared in this scope
    9 | scamf(&ld,%n);
      |        ^~
a.cc:9:11: error: expected primary-expression before '%' token
    9 | scamf(&ld,%n);
      |           ^
a.cc:9:1: error: 'scamf' was not declared in this scope; did you mean 'scanf'?
    9 | scamf(&ld,%n);
      | ^~~~~
      | scanf
a.cc:12:4: error: invalid operands of types 'long int' and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   12 | b=n%pow(10,p);
      |   ~^~~~~~~~~~
      |   |    |
      |   |    __gnu_cxx::__promote<double>::__type {aka double}
      |   long int
a.cc:19:1: error: expected primary-expression before '}' token
   19 | }
      | ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C

#include <cstdio>

int main() {
	int n, ans = 0x3f3f3f3f;
	scanf("%d", &n);
	for (int i = 1; i <= n / 2; ++i) {
		int a = i, b = n - i, t = 0;
		while (a) t += a % 10, a /= 10;
		while (b) t += b % 10, b /= 10;
		if (t < ans) ans = t;
	}
	printf("%d\n", ans);
}

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

import java.util.*;
public class Main {
	public static void main(String[] args){
		digitSum();
	}
	
	public static void digitSum() {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int a = num/2, b = a;
		if (num % 2 != 0) a += 1;
		int res = Integer.MAX_VALUE;
		while (a < num && b > 0) {
			res = Math.min(res, digit(a) + digit(b));
			a++;
			b--;
		}
		System.out.println(res);
	}
	
	public static int digit(int a) {
		int res = 0;
		while (a > 0) {
			res += a % 10;
			a /= 10;
		}
		return res;
	}

Compiler output:
Main.java:28: error: reached end of file while parsing
	}
	 ^
1 error
Language: C

#include <stdio.h>
#include <string.h>
 
int main(void) {
	int n, sum = 0;
	scanf("%d", &n);
	sum = n / 100000 + (n % 100000) / 10000 + (n % 10000) / 1000 (n % 1000) / 100 + (n % 100) / 10 + n % 10;
	if (sum == 1) sum = 10;
	printf("%d", sum);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:65: error: called object is not a function or function pointer
    7 |         sum = n / 100000 + (n % 100000) / 10000 + (n % 10000) / 1000 (n % 1000) / 100 + (n % 100) / 10 + n % 10;
      |                                                                 ^~~~
Language: C++

from sys import stdin


def a(s):
    result = 0
    for c in s[::-1]:
        result += int(c)
    return result


def main():
    N = int(stdin.readline().rstrip())
    print(min([a(str(x)) + a(str(N - x)) for x in range(1, N // 2 + 1)]))


if __name__ == '__main__':
    main()


Compiler output:
a.cc:16:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   16 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from sys import stdin
      | ^~~~
Language: C++

N = int(input())

minimum = N * 100

def kakuiNoWa(x:int):
    digits = []
    for i in range(5):
        digits.append(int(str(int(x / (10 ** i)))[-1]))
    return sum(digits)

for i in range(1, int(N / 2) + 1):
    result = kakuiNoWa(i) + kakuiNoWa(N-i)
    minimum = min(minimum, result)

print(minimum)


Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Scanner;
import java.util.TreeMap;

public class Maze {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		int n=s.nextInt();
		int b;
		int minsum=Integer.MAX_VALUE;
		for(int a=1;a<=n/2;a++){
			b=n-a;
			int tempa=a;
			//System.out.println("ere");
			int suma=0;
			int sumb=0;
			while(tempa>0){
				suma+=tempa%10;
				tempa/=10;
			}
			while(b>0){
				sumb+=b%10;
				b/=10;
			}
			if(suma+sumb<minsum){
				//System.out.println(a+" "+sumb);
				minsum=suma+sumb;
			}
		}
		System.out.println(minsum);
	}
}

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

#include <iostream>
using namespace std;

int sumDigit(int a, int b){
    int sd=0;
    while (a > 0) {
        sd += a % 10;
        a /= 10;
    }
    while (b > 0) {
        sd += b % 10;
        b /= 10;
    }

    return sd;
}

int main(){
    int N, min=INT_MAX;

    cin >> N;
    for(int i=1; i<N; i++){
        int j = N - i;
        int sd;

        sd = sumDigit(i, j);
        if(sd < min) min = sd;
    }

    cout << min << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:16: error: 'INT_MAX' was not declared in this scope
   19 |     int N, min=INT_MAX;
      |                ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: Java

public class Main {
	public static void main(String[] args){
		digitSum();
	}
	
	public static void digitSum() {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int a = num/2, b = a;
		if (num % 2 != 0) a += 1;
		int res = Integer.MAX_VALUE;
		while (a <= num && b >= 0) {
			res = Math.min(res, digit(a) + digit(b));
			a++;
			b--;
		}
		System.out.println(res);
	}
	
	public static int digit(int a) {
		int res = 0;
		while (a > 0) {
			res += a % 10;
			a /= 10;
		}
		return res;
	}
}

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

def main():
    n = int(input())
    s = str(n)
    if n % 10 ** (len(s) - 1) == 0:
        print(10)
    else:
        a = 0
        for i in s:
            a += int(i)
        print(a)

if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C

#include <iostream>
#include <cstdio>
#include <vector>
#include <deque>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <string>

using namespace std;

#define REPI(x) for(int i=0;i<x;i++)
#define REPJ(x) for(int j=0;j<x;j++)

int dsum(int x){
    int re=0,d=100000,xbuf=x;
    REPI(6){
        re+=xbuf/d;
        xbuf%=d;
        d/=10;
    }
        
    return re;
}


int main(){
    int N;
    int res,buf;
    scanf("%d",&N);

    res = dsum(N-1)+1;

    for(int i=2;i<=N/2;i++){
        buf = dsum(i)+dsum(N-i);
        if(buf<res) res = buf;
    }

    printf("%d\n",res);
    return 0;
}

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

#include<stdio.h>
int main()
{
int a;
int b,sum=10000;
scanf("%d",&a);
for (int i=1;i<a;i++)
{
int c=a-i;
if(i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10+c%10+(c/10)%10+(c/100)%10+(c/1000)%10+(c/10000)%10<sum)
b=i;
sum=i%10+(i/10)%10+(i/100)%10+(i/1000)%10+(i/10000)%10+c%10+(c/10)%10+(c/100)%10+(c/1000)%10+(c/10000)%10;
}
printf("%d",sum)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before '}' token
   14 | printf("%d",sum)
      |                 ^
      |                 ;
   15 | }
      | ~
Language: C++

#include <iostream>
#include <stdint.h>
#include <utility>

using namespace std;

int32_t digits_sum(int32_t D)
{
  int32_t ans = 0;
  while (D > 0) {
    ans += D % 10;
    D /= 10;
  }
  return ans;
}

int main()
{
  int32_t N;

  cin >> N;

  int32_t A,B;

  int32_t min_sum = INT_MAX;

  for (A=1; A<N/2; ++A) {    
    B = N-A;
    min_sum = min(min_sum, digits_sum(A)+digits_sum(B));
  }
  
  cout << min_sum << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: 'INT_MAX' was not declared in this scope
   25 |   int32_t min_sum = INT_MAX;
      |                     ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <utility>
  +++ |+#include <climits>
    4 |
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
#include <queue>
using namespace std;
typedef long long ll;
const int N = 1e5+5;
int a[N],b[N];

int main()
{
     int n;
   long long mina=100000000000000;
    cin>>n;
    for(int i=2;i<=n/2;i++){
        int a=i,b=n-i;
        int sum=0;
        while(a){
            sum=sum+a%10;
            a=a/10;
        }
        while(b){
            sum=sum+b%10;
            b=b/10;
        }
        mina=min(mina,sum);
    }
    cout<<mina<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:17: error: no matching function for call to 'min(long long int&, int&)'
   36 |         mina=min(mina,sum);
      |              ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:36:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   36 |         mina=min(mina,sum);
      |              ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:36:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   36 |         mina=min(mina,sum);
      |              ~~~^~~~~~~~~~
Language: Java

public class Main {
	public static void main(String[] args){
		//editor();
		//editor2();
		// System.out.println(helper2(31, 5));
		//tower();
		digitSum();
	}
	
	public static void digitSum() {
		Scanner sc = new Scanner(System.in);
		int num = sc.nextInt();
		int a = num/2, b = a;
		if (num % 2 != 0) a += 1;
		int res = Integer.MAX_VALUE;
		while (a <= num && b >= 0) {
			res = Math.min(res, digit(a) + digit(b));
		}
		System.out.println(res);
	}
	
	public static int digit(int a) {
		int res = 0;
		while (a > 0) {
			res += a % 10;
			a /= 10;
		}
		return res;
	}
}

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

// In the Name of God

#include <bits/stdc++.h>

using namespace std;

#define	ll long long
#define ull unsigned long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define sz(a) int(a.size())
#define all(v) v.begin(), v.end()
#define bpc(v) __builtin_popcountll(v)
#define itr iterator
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define per(i, a, b) for (int i = a; i >= b; --i)
#define ub upper_bound
#define lb lower_bound

const int N = 1e5 + 5;
const int inf = 1e9 + 1;
const int mod = 1e9 + 7;
const double eps = 1e-15;
const int pw = 257;

int main() {
	#ifdef Madi
	freopen(".in", "r", stdin);
	freopen(".out", "w", stdout);
	#endif

	ios_base :: sync_with_stdio(false); cin.tie(NULL);


	cin >> n;
	int ans = 0;
	rep(i, 0, sz(n) - 1)
		ans += int(n[i] - '0');
	if (ans == 1)
		ans *= 10;

	cout << ans;
	return 0;          
}

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

#include<iostream>
using namespace std;

int main()
{
	int n;
	cin>>n;
	long long minn=INT_MAX;
	for(int i=1;i<=n/2;++i)
	{
		int temp1=i;
		int temp2=n-i;
		long long sum=0;
		while(temp1)
		{
			sum+=temp1%10;
			temp1/=10;
		}
		while(temp2)
		{
			sum+=temp2%10;
			temp2/=10;
		}
		if(sum<minn)
			minn=sum;
	}
	cout<<minn<<endl;
	return 0;
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:24: error: 'INT_MAX' was not declared in this scope
    8 |         long long minn=INT_MAX;
      |                        ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

n = int(input())

digsum = lambda x: sum(map(int, str(x)))
ans = 100
for a in range(1, n):
    b = n - a
    ans = min(ans, digsum(a) + digsum(b))
print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: Java

/**
 * @author Finn Lidbetter
 */
import java.util.*;
import java.io.*;
import java.awt.geom.*;

public class TaskA {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringBuilder sb = new StringBuilder();
    
    int n = Integer.parseInt(br.readLine());
    int min = 987654321;
    for (int i=1; i<=n/2 + 1; i++) {
      int a = i;
      int b = n-i;
      if (a<=0 || b<=0)
        continue;
      int sum = sumDigits(a)+sumDigits(b);
      if (sum<min)
        min = sum;
    }
    System.out.println(min);
  }
  static int sumDigits(int a) {
    int copy = a;
    int sum = 0;
    while (copy>0) {
      sum += copy%10;
      copy/=10;
    }
    return sum;
  }
}


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

import java.util.Scanner;
public class Main8 {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int x = 0;
		for(int i = 1;i <= a;i++){
			x = i / 10000 + ((i % 10000) / 1000) + ((i % 1000) / 100) + ((i % 100) / 10) + (i % 10);
		}
		System.out.println(x);
	}
}

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

n =int(input())

ans = 100000000
for i in range(1, n):
    tmp = 0
    a = i
    b = n-i
    for d in str(a):
        tmp += int(d)
    for d in str(b):
        tmp += int(d)
    ans = min(tmp, ans)

print(ans)

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n =int(input())
      | ^
Language: C++

n = int(input())

ans = 2000000000
for a in range(1, n):
	b = n-a
	X = str(a)
	Y = str(b)
	s = sum([int(a) for a in X])
	s += sum([int(a) for a in Y])
	ans = min(ans, s)
print (ans)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include <iostream>
using namespace std;
typedef long long ll;
ll n,m,MOD=998244353,a,b,ans,bik[300001],A[300001],B[300001];
ll f(ll x,ll y){
    if(y==0)return 1;
    if(y%2==0)return f(x,y/2)*f(x,y/2)%MOD;
    return x*f(x,y-1)%MOD;
}
ll comb(ll x, ll y){
    return bik[x]*f(bik[x-y],MOD-2)%MOD*f(bik[y],MOD-2)%MOD;
}
int main(void){
    bik[0]=1;
    for(ll i=1;i<=300000;i++){
        bik[i]=bik[i-1]*i;
        bik[i]%=MOD;
    }
    cin>>n>>a>>b>>m;
    for(ll i=0LL;i<=min(n,(m/a));i++){
        A[i]=comb(n,i);
    }
    for(ll i=0LL;i<=min(n,(m/b));i++){
        B[i]=comb(n,i);
    }
    for(ll i=0LL;i<=min(n,(m/a));i++){
        if((m-i*a)%b==0&&m-i*a)/b<=n){
            ans+=A[i]*B[(m-i*a)/b]%MOD;
            ans%=MOD;
        }
    }
    cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:32: error: expected primary-expression before '/' token
   27 |         if((m-i*a)%b==0&&m-i*a)/b<=n){
      |                                ^
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 998244353;
const ll INF = 1e16;
const ll MAX_N = 600010;

const ll MAX_N = 200010;

// aのn乗を求める。計算量はO(logn)
ll modpow(ll a, ll n) {
    if(n == 0) {
        return 1;
    }
    if(n%2 == 1) {
        return (a * modpow(a, n-1))%mod;
    }
    return (modpow(a, n/2) * modpow(a, n/2))%mod;
}

ll inverse(ll a) {
    return modpow(a, mod-2);
}

ll inv[MAX_N];  // inv[i] : iの逆数のmod
ll fact[MAX_N];  // fact[i] : iの階乗のmod
ll invfact[MAX_N];

void init() {
    inv[0] = fact[0] = invfact[0] = 1;
    inv[1] = 1;
    for(ll i = 1; i < MAX_N; i++) {
        if(i >= 2) {
            inv[i] = mod - inv[mod%i]*(mod/i)%mod;
        }
        fact[i] = (i*fact[i-1])%mod;
        invfact[i] = inverse(fact[i]);
    }
}
 
ll Comb(ll n, ll r) {
    if(r < 0 || n < 0 || n < r) {
        return 0;
    }
    ll res = fact[n];
    res = (res * invfact[r])%mod;
    res = (res * invfact[n-r])%mod;
    return res;
}

//--- main関数でinit()を呼び出すのを忘れるな ---//
int main() {
    ll n, a, b, k;
    cin >> n >> a >> b >> k;

    init();

    ll ans = 0;
    exrep(x, 1, min(k/a, n)) {
        if((k - a*x)%b == 0) {
            ll y = (k - a*x)/b;
            ans += Comb(n, x)*Comb(n, y)%mod;
            ans %= mod;
        }
    }
    
    out(ans);
    re0;
}

Compiler output:
a.cc:32:10: error: redefinition of 'const ll MAX_N'
   32 | const ll MAX_N = 200010;
      |          ^~~~~
a.cc:30:10: note: 'const ll MAX_N' previously defined here
   30 | const ll MAX_N = 600010;
      |          ^~~~~
Language: C++

#include <iostream>
using namespace std;

const int MAX = 510000;
const int MOD = 998244353;

long long fac[MAX], finv[MAX], inv[MAX];


void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

long long N, A, B, K;

int main() {
    COMinit(); // テーブルを作る

    cin >> N >> A >> B >> K;
    long long res = 0;
    for (long long a = 0; a <= N; ++a) { // A の個数を全探索
        long long rem = K - a * A;
        if (rem % B != 0) continue;
        long long b = rem / B;
        if (b > N) continue;
        long long tmp = COM(N, a) * COM(N, b) % MOD;
        res += tmp;
        res %= MOD;
    }

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

#include<iostream>
using namespace std;
int N,A,B,K;
typedef long long int ll;
ll rs;
const int mod=998244353;
const int LM=3e5+10;
const int LN=1e6+10;
ll ra[LN],rn[LN];
int main()
{
	cin>>N>>A>>B>>K;rs=0;
	ra[0]=1;rn[0]=1;
	for(ll i=1;i<=N;i++)
	{ra[i]=ra[i-1]*(N-i+1)/i%mod;rn[i]=rn[i-1]*(N-i+1)/i%mod;}
	for(ll i=0;i<=N&&i<=K/A;i++)
		if((K-A*i)%B==0)
			rs=(rs+[i]*rn[(K-A*i)/B]%mod)%mod;
	cout<<rs<<endl;
}

Compiler output:
a.cc: In lambda function:
a.cc:18:35: error: expected '{' before '*' token
   18 |                         rs=(rs+[i]*rn[(K-A*i)/B]%mod)%mod;
      |                                   ^
a.cc: In function 'int main()':
a.cc:18:35: error: no match for 'operator*' (operand types are 'main()::<lambda()>' and 'll' {aka 'long long int'})
   18 |                         rs=(rs+[i]*rn[(K-A*i)/B]%mod)%mod;
      |                                ~~~^~~~~~~~~~~~~~
      |                                |               |
      |                                |               ll {aka long long int}
      |                                main()::<lambda()>
Language: C++

#include<iostream>
using namespace std;
int N,A,B,K,rs;
int c_(int a,int b)
{
	if(b==0)return 1;
	else
	{
		if(a-b<b)b=a-b;
		int tt=1,ttt=1;for (int i=0;i<b;i++){tt*=(a-i);ttt*=(i+1);}
		return tt/ttt;
	}
}
int main()
{
	cin>>N>>A>>B>>K;
	rs=0;
	for(int a1=0;a1<=N&&a1<=K/A);a1++)
		for(int a2=0;a2<=(K-a1*A)/B&&a2<=N-a1;a2++)
			for(int a3=0;a3<=(K-a1*A-a2*B)/(B+A)&&a3<=N-a1-a2;a3++)
				if(a1*A+a2*B+a3*(A+B)==K)
					{rs+=c_(N,a1)*c_(N-a1,a2)*c_(N-a1-a2,a3);}
	cout<<rs<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:36: error: expected ';' before ')' token
   18 |         for(int a1=0;a1<=N&&a1<=K/A);a1++)
      |                                    ^
      |                                    ;
a.cc:18:38: error: 'a1' was not declared in this scope
   18 |         for(int a1=0;a1<=N&&a1<=K/A);a1++)
      |                                      ^~
a.cc:19:30: error: 'a2' was not declared in this scope
   19 |                 for(int a2=0;a2<=(K-a1*A)/B&&a2<=N-a1;a2++)
      |                              ^~
a.cc:20:38: error: 'a3' was not declared in this scope
   20 |                         for(int a3=0;a3<=(K-a1*A-a2*B)/(B+A)&&a3<=N-a1-a2;a3++)
      |                                      ^~
Language: C++

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

#define FILE_IN "pviz.in"
#define FILE_OUT "pviz.out"
#define ofile freopen(FILE_IN,"r",stdin);freopen(FILE_OUT,"w",stdout)
#define fio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define nfio cin.tie(0);cout.tie(0)
#define max(x,y) (((x)>(y))?(x):(y))
#define min(x,y) (((x)<(y))?(x):(y))
#define ord(a,b,c) ((a>=b)and(b>=c))
#define MOD 1000000009
#define mag 320
#define p1 first
#define p2 second.first
#define p3 second.second
#define pow2(x) (ll(1)<<x)
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<int,pii> piii;
#define endl "\n"
using namespace std;

 
int main(){
fio;
  int n;
  cin >> n;
  int maxsum = 100000000;
  for(int i=1;i <= n-1;i++){
    int a = i;
    int b = n-i;
    int sum = 0;
    string sa = to_string(a);
    string sb = to_string(b);
    rep(i,sa.size()){
      sum += sa.at(i) - '0';
    }
    rep(i,sb.size()){
      sum += sb.at(i) - '0';
    }
    maxsum = min(maxsum,sum);
  }
  cout << maxsum << endl;
}

Compiler output:
a.cc:19:9: error: 'pair' does not name a type
   19 | typedef pair<int,int> pii;
      |         ^~~~
a.cc:20:9: error: 'pair' does not name a type
   20 | typedef pair<int,pii> piii;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0; i<(n); ++(i))
#define print(a) cout << (a) << endl

const ll mod=998244353;

ll com(ll p, ll K) {
  ll b = 1, c = 1, d = 1;
  for (ll i = 1; i <= N-K; i++) b = (b*i)%mod;
  for (ll j = 1; j <=K; j++) c = (c*j)%mod;
  ll e = (b*c)%mod, m_ = mod-2;
  while(m_ != 0) {
    if (m_&1) d = (d*e)%mod;
    e = e*e%mod;
    m_ = m_ >> 1;
  }
  return (p*d)%mod;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  ll n,a,b,k,ans=0,val=0,p=1,j=0;cin>>n>>a>>b>>k;
  for (ll h = 1; h <= n; h++) p=(p*h)%mod;
  if(!(k>(a+b)*n)) {
    for(ll i=0;i<=n;++i) {
      if((k-a*i)%b==0) {
        j=(k-a*i)/b;
        if(j<=n) {
          ans+=(com(p,i)*com(p,j))%mod;
          ans%=mod;
        }
      }
    }    
  }
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'long long int com(long long int, long long int)':
a.cc:13:23: error: 'N' was not declared in this scope
   13 |   for (ll i = 1; i <= N-K; i++) b = (b*i)%mod;
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define SIZE 300005
#define MOD 998244353LL
#define EPS 1e-10
#define INF 2147483647
#define LLINF 9223372036854775807
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef int_fast64_t ll;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
typedef complex<double> dcomplex;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cerr<<a[i]<<((i==a.size()-1)?"\n":" ");}}
ll gcd(ll a,ll b){ll c=max(a,b);ll d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
ll lcm(ll a,ll b){return a==0||b==0?0:a*b/gcd(a,b);}
ll modfact(ll a){ll b=1;FOR(i,2,a)b=b*i%MOD;return b;}
ll modpow(ll a, ll n){ll b=1;while (n>0){if(n&1)b=b*a%MOD;a=a*a%MOD;n>>=1;}return b;}
ll modcomb(ll n, ll k){ll b=1;k=min(n-k,k);DOWN(i,n,n-k+1)b=b*i%MOD;return b*modpow(modfact(k),MOD-2)%MOD;}

ll N, A, B, K, ans = 0;
vector<ll> fact, ifact;
 
void init(ll size) {
    fact.resize(size+1);
    ifact.resize(size+1);
    // fact = new ll[size+1];
    // ifact = new ll[size+1];
    fact[0] = 1;
    FOR(i, 1, size)
        fact[i] = i*fact[i-1]%MOD;
    ifact[size] = modpow(fact[size], MOD-2);
    DOWN(i, size-1, 0)
        ifact[i] = ifact[i+1]*(i+1)%MOD;
}
 
ll comb(ll n, ll k) {
    ll res = fact[n]*ifact[k]%MOD;
    return res*ifact[n-k]%MOD;
}

int main() {
	cin >> N >> A >> B >> K;
	init(510000);
  	ll i=0, j;
	for(ll i=0, i<=N, i++) {
	    j = K-A*i;
        if(j < 0) break;
		if(j%B) continue;
    	ans = (ans+(comb(N,i)*comb(N,j/B)%MOD))%MOD;
	}
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:22: error: expected ';' before '<=' token
   53 |         for(ll i=0, i<=N, i++) {
      |                      ^~
      |                      ;
a.cc:53:22: error: expected primary-expression before '<=' token
   53 |         for(ll i=0, i<=N, i++) {
      |                      ^~
a.cc:53:30: error: expected ';' before ')' token
   53 |         for(ll i=0, i<=N, i++) {
      |                              ^
      |                              ;
Language: C++

/*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define ALL(a)  (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll Len(ll n) {
  ll s=0;
  while(n!=0) s++, n/=10;
  return s;
}


ll Sint(ll n) {
  ll m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
  return m;
}


ll Svec(vector<ll> v){
  ll n=0;
  for(ll i=0;i<v.size();i++) n+=v[i];
  return n;
}


ll GCD(ll a,ll b){
  ll r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return b;
}


ll LCM(ll a,ll b){
  ll c=a,d=b,r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return c/b*d;
}


ll Factorial(ll n){
  ll m=1;
  while(n>=1) m*=n,n--;
  return m;
}

vector<pair<char,ll>> runlength(string s,vector<pair<char,ll>> p){
  ll x=1;
  if(s.size()==1){
    p.push_back(pair<char,ll>(s[0],1));
    return p;
  }
  for(ll i=0;i<s.size()-1;i++){
    if(s[i]==s[i+1]){
      x++;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[i],x));
      }
    }else{
      p.push_back(pair<char,ll>(s[i],x));
      x=1;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[s.size()-1],x));
      }
    }
  }
  return p;
}

ll COM(ll n,ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}


/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
  IOS;
  ll n,a,b,k,ans=0;
  cin>>n>>a>>b>>k;
  map<ll,ll> mp;
  rep(i,n){
    if((k-i*a)%b==0 && (k-i*a)/b>=0 && (k-i*a)/b<=n){
      mp[i]=(k-i*a)/b;
    }
  }
  COMinit();
  for(auto c:mp){
    ans+=COM(n,c.first)*COM(n.c.second);
  }
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:125:31: error: request for member 'c' in 'n', which is of non-class type 'll' {aka 'long long int'}
  125 |     ans+=COM(n,c.first)*COM(n.c.second);
      |                               ^
Language: C

#include<stdio.h>

#define ll long long

ll M=998244353;
ll fact[300001],ifact[300001];

ll mpow(ll x,ll n){
  ll ans=1;
  while(n != 0){
    if(n&1) ans=ans*x%M;
    x=x*x%M;
    n=n>>1;
  }
  return ans;
}

ll combi(ll n,ll x){
  if(n==0&&x==0)return 1;
  if(n<x||n<0)return 0;
  return fact[n]*ifact[n-x]%M*ifact[x]%M;
}

int main(){
  ll i,n,a,b,k,j,sum=0;
  scanf("%lld %lld %lld %lld",&n,&a,&b,&k);
  fact[0]=1;
  ifact[0]=1;
  for(i=0;i<n;i++){
    fact[i+1]=fact[i]*(i+1)%M;
    ifact[i+1]=ifact[i]*mpow(i+1,M-2)%M;
  }
  for(i=0;i<=n;i++){
    ll j=(k-i*a)/b;
    if(0<=j&&j<=n&&i*a+j*b==k)ans=(ans+combi(n,i)*combi(n,j))%M;
  }
  printf("%lld",sum);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:35:31: error: 'ans' undeclared (first use in this function)
   35 |     if(0<=j&&j<=n&&i*a+j*b==k)ans=(ans+combi(n,i)*combi(n,j))%M;
      |                               ^~~
main.c:35:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

#define M 998244353
#define ll long long

ll fact(ll n){
  if(n==1)return 1;
  return n*fact(n-1)%M;
}

ll mpow(ll x,ll n){
  ll ans=1;
  while(n != 0){
    if(n&1) ans=ans*x%M;
    x=x*x%M;
    n=n>>1;
  }
  return ans;
}

ll combi(ll n,ll x){
  if(n==0&&x==0)return 1;
  if(n<x||n<0)return 0;
  return fact(n)*mpow(fact(k),M-2)%M*mpow(fact(n-k),M-2)%M;
}

int main(){
  ll i,n,a,b,k,j,sum=0;
  scanf("%lld %lld %lld %lld",&n,&a,&b,&k);
  for(i=0;i<=n;i++){
    if((k-a*i)%b==0) {
      j=(k-a*i)/b;
      sum+=combi(n,a)*combi(n,b)%M;
    }
  }
  printf("%lld",sum);
  return 0;
}

Compiler output:
main.c: In function 'combi':
main.c:24:28: error: 'k' undeclared (first use in this function)
   24 |   return fact(n)*mpow(fact(k),M-2)%M*mpow(fact(n-k),M-2)%M;
      |                            ^
main.c:24:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
#define up(i,a,b) for(register int i=a;i<=b;i++)
#define Auto(i,x) for(register int i=h[x];i;i=e[i].nxt)
#define cntsize(a) (sizeof(a) / 1024.0 / 1024.0)
#define re register
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
struct ios{
	template <typename ty> inline ios& operator >> (ty &x){
		x = 0;register char c=getchar();int f=1;
		for(;!isdigit(c);c=getchar()) if(c=='-') f=-1;
		for(;isdigit(c);c=getchar()) x = (x<<1) + (x<<3) + (c^48);
		x *= f;return *this;
	}
	template <typename ty> inline ios& operator << (ty x){
		if(x < 0) putchar('-') , x=-x;
		if(x > 9) *this << x/10;
		putchar(x%10+48);return *this;
	} 
	inline ios& operator << (char x){putchar(x);return *this;}
}io;
const int N = 2e7;
const ll mod = 998244353;
ll fac[N],inv[N];
inline ll C(ll n, ll m)
{
	if(n>=N||m>=N) return 1;
	if(n<=0||m<=0) return 1;
//	return fac[n] * inv[m] % mod * inv[n-m] % mod;
	return fac[n] * ksm(m,mod-2) % mod * ksm(n-m,mod-2) % mod;
}
ll n,a,b,k;
inline ll ksm(ll a, ll b)
{
	ll ret = 1;
	for(;b;b>>=1, a=a*a%mod) if(b&1) ret = (ret * a) % mod;
	return ret;
}
int main()
{
	io >> n >> a >> b >> k;
	fac[0] = 1;for(ll i=1;i<=N-5;i++) fac[i] = (fac[i-1] * i) % mod;
	inv[N-5] = ksm(fac[N-5],mod-2);
	for(ll i=N-6;i>=1;i--) inv[i] = (inv[i+1] * (i+1)) % mod;
	ll ans = 0;
	for(ll R=0;R*a<=k && R<=n;R++)
	{
		if((k - R * a) % b == 0)
		{
			ll B = (k - R * a) / b;
			if(B > n) continue;
			ans = (ans + C(n,R) * C(n,B) % mod) % mod;
		}
	}
	io << ans;
	return 0;
}

Compiler output:
a.cc: In member function 'ios& ios::operator>>(ty&)':
a.cc:11:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   11 |                 x = 0;register char c=getchar();int f=1;
      |                                     ^
a.cc: In function 'll C(ll, ll)':
a.cc:31:25: error: 'ksm' was not declared in this scope
   31 |         return fac[n] * ksm(m,mod-2) % mod * ksm(n-m,mod-2) % mod;
      |                         ^~~
a.cc: In instantiation of 'ios& ios::operator>>(ty&) [with ty = long long int]':
a.cc:42:8:   required from here
   42 |         io >> n >> a >> b >> k;
      |               ^
a.cc:11:37: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   11 |                 x = 0;register char c=getchar();int f=1;
      |                                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SMALLPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
ll inf=1000000007;
const int mod=998244353;
void chmin(auto &a,auto b){if(b<a)a=b;}
void chmax(auto &a,auto b){if(a<b)a=b;}
ll GCD(ll a,ll b,ll &x,ll &y){
  if(b==0){x=1;y=1;return a;}
  ll d=GCD(b,a%b,y,x);
  y-=a/b*x;
  return d;
}
int main(){
  ll x,y,n,a,b,k;cin>>n>>a>>b>>k;
  ll d=GCD(a,b,x,y);
  if(k%d!=0){
    cout<<0<<endl;
    return 0;
  }
  vi l,r;
  x*=(k%d);y*=(k%d);
  if(x<y)swap(x,y);
  y=
}


Compiler output:
a.cc:17:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   17 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |            ^~~~
a.cc:17:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   17 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |                    ^~~~
a.cc:18:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |            ^~~~
a.cc:18:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:36:1: error: expected primary-expression before '}' token
   36 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SMALLPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
ll inf=1000000007;
const int mod=998244353;
void chmin(auto &a,auto b){if(b<a)a=b;}
void chmax(auto &a,auto b){if(a<b)a=b;}
ll GCD(ll a,ll b,ll &x,ll &y){
  if(b==0){x=1;y=1;return a;}
  ll d=GCD(b,a%b,y,x);
  y-=a/b*x;
  return d;
}
int main(){
  ll x,y,n,a,b,k;cin>>n>>a>>b>>k;
  ll d=GCD(a,b,x,y);
  if(x<y)swap(x,y);
  if(y<0)y+=
}

Compiler output:
a.cc:17:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   17 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |            ^~~~
a.cc:17:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   17 | void chmin(auto &a,auto b){if(b<a)a=b;}
      |                    ^~~~
a.cc:18:12: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |            ^~~~
a.cc:18:20: warning: use of 'auto' in parameter declaration only available with '-std=c++20' or '-fconcepts'
   18 | void chmax(auto &a,auto b){if(a<b)a=b;}
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:30:1: error: expected primary-expression before '}' token
   30 | }
      | ^