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

#include <bits/stdc++.h>

using namespace std;

int main() {

    long long int N=0, A=0, B=0;
    long int r = 0, q = 0;

    cin >> N >> A >> B;
    
    q = N / (A + B);

    r = N % (A + B);

    cout << A*q + min(A, r) << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: no matching function for call to 'min(long long int&, long int&)'
   16 |     cout << A*q + min(A, r) << endl;
      |                   ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:16:22: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long int')
   16 |     cout << A*q + min(A, r) << endl;
      |                   ~~~^~~~~~
/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:
/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:16:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   16 |     cout << A*q + min(A, r) << endl;
      |                   ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {

    long long int N=0, A=0, B=0;
    long int r = 0, q = 0;

    cin >> N >> A >> B;
    
    q = N / (A + B);

    r = N % (A + B);

    int ans = A*q + min(A, r);

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:24: error: no matching function for call to 'min(long long int&, long int&)'
   16 |     int ans = A*q + min(A, r);
      |                     ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:16:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long int')
   16 |     int ans = A*q + min(A, r);
      |                     ~~~^~~~~~
/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:
/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:16:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   16 |     int ans = A*q + min(A, r);
      |                     ~~~^~~~~~
Language: C++

using namespace std;

int main() {

    long int N=0, A=0, B=0;
    long int r = 0, q = 0;

    cin >> N >> A >> B;
    
    q = N / (A + B);

    r = N % (A + B);

    int ans = A*q + min(A, r);

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> N >> A >> B;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:14:21: error: 'min' was not declared in this scope; did you mean 'main'?
   14 |     int ans = A*q + min(A, r);
      |                     ^~~
      |                     main
a.cc:16:5: error: 'cout' was not declared in this scope
   16 |     cout << ans << endl;
      |     ^~~~
a.cc:16:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:20: error: 'endl' was not declared in this scope
   16 |     cout << ans << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: Java

import java.util.Scanner;

public class J158B {

    public static void main(String[] args) {

        int N, A, B;
        int r = 0, q = 0;
        Scanner sc = new Scanner(System.in);

        N = sc.nextInt();
        A = sc.nextInt();
        B = sc.nextInt();

        q = N / (A + B);

        r = N - (A + B) * q;

        if (r <= A){
            System.out.println(A*q + r);
        }else if (r > A){
            System.out.println(A*q + A);
        }

    }

}


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

#include <bits/stdc++.h>

using namespace std;
typedef long long int;
int main()
{
	int n,a,b,blue,rem;
	blue=0;
	cin>>n>>a>>b;
	if(a+b==n)
	{
		cout<<a;
	}
	else if(a+b<n)
	{
		blue=(n/(a+b))*a;
		rem=n%(a+b);
		while(rem>0)
		{
			if(a>0)
			{
				a--;
				blue++;
			}
			rem--;	
		}
		cout<<blue;
	}
	else if(a+b>n)
	{
		rem=a+b;
		while(rem>0)
		{
			if(a>0)
			{
				a--;
				blue++;
			}
			rem--;	
		}
		cout<<blue;
	}
	return 0;
}

Compiler output:
a.cc:4:19: error: declaration does not declare anything [-fpermissive]
    4 | typedef long long int;
      |                   ^~~
Language: C++

#include <iostream>

int main() {
    int N, A, B;
    std::cin >> N >> A >> B;

    int a = N/(A+B) * A;

    int rem = N%(A+B);
    a += std::min(rem ,A);

    std::cout << a std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before 'std'
   12 |     std::cout << a std::endl;
      |                   ^~~~
      |                   ;
Language: C++

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

int main() {
	int n, a, b;
	cin >> n >> a >> b;
	
	ans = n/(a+b);
	rem = n%(a+b);
	
	if (rem < a) ans += rem;
	else ans += a;
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |         ans = n/(a+b);
      |         ^~~
      |         abs
a.cc:9:9: error: 'rem' was not declared in this scope; did you mean 'drem'?
    9 |         rem = n%(a+b);
      |         ^~~
      |         drem
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N,A,B,;
    cin >> N >> A >> B;
    cout << N/(A+B)+min(A,N%(A+B)) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: expected unqualified-id before ';' token
    5 |     int N,A,B,;
      |               ^
Language: C++

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

//桁あふれか０除算している？
int main() {
	
	int n, a, b;
	cin >> n >> a >> b;
	
	if (a == 0){
		cout << 0 << endl;
	}
	else if (b == 0){
		cout << n << endl;
	}
	else if (n%(a+b)>a) {
		cout << a(n/(a+b))+a;
	}
	else {
		cout << a(n/(a+b)+n%(a+b) << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: 'a' cannot be used as a function
   17 |                 cout << a(n/(a+b))+a;
      |                         ~^~~~~~~~~
a.cc:20:43: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   20 |                 cout << a(n/(a+b)+n%(a+b) << endl;
      |                           ~~~~~~~~~~~~~~~~^~~~~~~
Language: C++

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

int main() {
  int n,a,b;
  cin >> n >> a >> b;
  int rem = n%(a+b),ans=(n/(a+b))*a;
  ans += min(rem,a)
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before 'cout'
    9 |   ans += min(rem,a)
      |                    ^
      |                    ;
   10 |   cout << ans << endl;
      |   ~~~~
Language: C++

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

int main() {
  int n,a,b;
  cin >> n >> a >> b;
  int rem = n/(a+b)
  cout << rem*a + min(rem,a) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cout'
    9 |   cout << rem*a + min(rem,a) << endl;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
#define ll long long 
using namespace std;
signed main(){
  ll n,b,a,x,y;
  cin>>n>>a>>b;
  x = n / (a + b);
  y = min(a,n%(a+b));
  cout<< x * a + y<<"\n";
  retur(0);
}

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

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

int main() {
    long long N;
    long long Blue;
    long long Red; 
    cin >> N >> Blue >> Red;
    long long BR = Blue + Red;
    long long BR_count = N / BR;
    N = N % BR;
    long long tot_count = BR_count * B;
    if (N >= B) {
        tot_count += B;
    } else {
        tot_count += N;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:38: error: 'B' was not declared in this scope; did you mean 'BR'?
   12 |     long long tot_count = BR_count * B;
      |                                      ^
      |                                      BR
Language: C

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

int main(){
    long long n,blue,red;
    cin >> n >> blue >> red;
    /**/
    long long rest = n%(blue + red);
    long long count = (n - rest)/(blue + red);
    long long ans = blue*count + min(rest,blue);
    cout << ans << endl;
    return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep2(i,s,n) for(int i=(s);i<(int)(n);i++)
typedef long long ll;
const int INF=1e+09;
ll N,A,B;


int main(){    
    //入力
    cin >> N >> A >> B;
    cout <<(ll)(N/(A+B))*A+min((N-(ll)(N/(A+B))*(A+B),A)) <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:31: error: no matching function for call to 'min(ll&)'
   13 |     cout <<(ll)(N/(A+B))*A+min((N-(ll)(N/(A+B))*(A+B),A)) <<endl;
      |                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/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:   template argument deduction/substitution failed:
a.cc:13:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   13 |     cout <<(ll)(N/(A+B))*A+min((N-(ll)(N/(A+B))*(A+B),A)) <<endl;
      |                            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

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

int main() {
  long long n,a,b;
  cin n >> a >> b;
  long long m = n/(a+b);
  long long l = n/%(a+b);
  long long ball = 0;
  ball += m*a;
  if(l<a){
    ball += l;
  }else{
    ball += a;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'n'
    6 |   cin n >> a >> b;
      |      ^~
      |      ;
a.cc:8:19: error: expected primary-expression before '%' token
    8 |   long long l = n/%(a+b);
      |                   ^
Language: C

#include<stdio.h>

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

	scanf("%d%d%d",&n,&a,&b);
	for(i=0;s<n;i++){
		m+=a;
		n+=b;
		s+=m+n;
	}
	printf("%d\n",m);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:25: error: redeclaration of 'n' with no linkage
    5 |         int n,a,b,i,m=0,n=0,s=0;
      |                         ^
main.c:5:13: note: previous declaration of 'n' with type 'int'
    5 |         int n,a,b,i,m=0,n=0,s=0;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll N, A, B;
  cin >> N >> A >> B;
  ll ans = 0;
  if(A==0) {
    cout << 0;
    return 0;
  }
  ll count = 0;
  int flag = 0;
  while(count => N) {
    if(flag==0) {
      count += A;
      ans += A;
      flag = 1;
    }
    if(flag==1) {
      count += B;
      flag = 0;
    }
  }
  if(flag==1) ans -= count - N;
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected primary-expression before '>' token
   14 |   while(count => N) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using ll = long long;
ll n, a, b, sum;
int main() {
    sum = 0;
    std::cin >> n >> a >> b;
    ll c = a + b;
    ll m = n % c;
    sum += std::min(a, m);
    ll res = (n-m)/c;
    sum += (res * a);
    std::cout << sum << std::endl;

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

#include<iostream>
using namespace std;
#define int long long int
int main(){
  int n,a,b;
  cin>>n>>a>>b;
  int ans=(n/(a+b))*a;
  if((n%(a+b))>a)	ans+=a;
  else	ans+=(n%(a+b));
  cout<<ans<<endl;
  return 0;
}


Compiler output:
a.cc:3:23: error: '::main' must return 'int'
    3 | #define int long long int
      |                       ^~~
a.cc:4:1: note: in expansion of macro 'int'
    4 | int main(){
      | ^~~
Language: C++

using namespace std;

int main(){
  int N,A,B;
  cin >> N >> A >> B;
  int d,f;
  d = N/(A+B);
  f = N%(A+B);
  int ans;
  if(f<=A){
    cout << d+f <<endl;
    
  }
  else{
    cout << d+A <<endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> A >> B;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << d+f <<endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:19: error: 'endl' was not declared in this scope
   11 |     cout << d+f <<endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << d+A <<endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:19: error: 'endl' was not declared in this scope
   15 |     cout << d+A <<endl;
      |                   ^~~~
a.cc:15:19: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>

using namespace std;

long long prime = 998244353;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long n, a, b;
    cin >> n >> a >> b;
    long long x = 0;
    x += n / (a + b) * b;
    n %= a + b;
    x += max(n - a, 0);
    cout << x << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: no matching function for call to 'max(long long int, int)'
   15 |     x += max(n - a, 0);
      |          ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:15:13: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   15 |     x += max(n - a, 0);
      |          ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:15:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   15 |     x += max(n - a, 0);
      |          ~~~^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pii pair<ll,ll>
#define ff first
#define ss second
#define sfi(a) scanf("%d",&a)
#define sfi2(a,b) scanf("%d %d",&a,&b)
#define sfi3(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define sfll(a) scanf("%lld",&a)
#define all(a) a.begin(),a.end()
#define keepu(a) a.erase(unique(all(a)),a.end())
#define inf 1e7
#define m_p make_pair
#define min3(a,b,c) min(a,min(b,c))
#define pb push_back
#define mem(x,val) memset(x,val,sizeof(x))
#define read freopen("input.txt","r",stdin)
#define write freopen("output.txt","w",stdout)
#define FAST  ios_base::sync_with_stdio(0);cout.tie(0)
#define sqr(x) ((x)*(x))

typedef long long ll;
const ll mod = 1e9+7;
const int sz = 500;


int main(){

    ll n,a,b;
    cin >> n >> a >> b;



               ll val = a+b;
               ll ans = a * (n/val);
               ans += min((n%val),a);
               cout << ans << endl;


    }
    return 0;
}


Compiler output:
a.cc:41:5: error: expected unqualified-id before 'return'
   41 |     return 0;
      |     ^~~~~~
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pii pair<ll,ll>
#define ff first
#define ss second
#define sfi(a) scanf("%d",&a)
#define sfi2(a,b) scanf("%d %d",&a,&b)
#define sfi3(a,b,c) scanf("%d %d %d",&a,&b,&c)
#define sfll(a) scanf("%lld",&a)
#define all(a) a.begin(),a.end()
#define keepu(a) a.erase(unique(all(a)),a.end())
#define inf 1e7
#define m_p make_pair
#define min3(a,b,c) min(a,min(b,c))
#define pb push_back
#define mem(x,val) memset(x,val,sizeof(x))
#define read freopen("input.txt","r",stdin)
#define write freopen("output.txt","w",stdout)
#define FAST  ios_base::sync_with_stdio(0);cout.tie(0)
#define sqr(x) ((x)*(x))

typedef long long ll;
const ll mod = 1e9+7;
const int sz = 500;


int main(){

    ll n,a,b;
    cin >> n >> a >> b;

    if(a==0) cout << 0 << endl;
    ekse if(b==0) cout << n << endl;
    else {
        ll rem = n - (a+b);
        if(rem<=0){
            cout << a << endl;
        }
        else {
            if(rem <= (a+b)) cout << a+min(a,rem) << endl;
            else {
               ll ans = a;
               ll rem1 = rem%(a+b);

               if(rem1 <= (a+b)) ans += min(rem1,a);

               ans += (rem1*a);

               cout << ans << endl;
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:5: error: 'ekse' was not declared in this scope
   33 |     ekse if(b==0) cout << n << endl;
      |     ^~~~
a.cc:34:5: error: 'else' without a previous 'if'
   34 |     else {
      |     ^~~~
Language: C++

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

int main(){

    int N, A, B;
    cin >> N >> A >> B;

    int n, m;
    m = N % (A + B)
    n = (N - m) / (A + B);

    if (m < A){
        cout << (A * n) + m << endl;    
    }

    else{
        cout << (A * n) + A << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:20: error: expected ';' before 'n'
   10 |     m = N % (A + B)
      |                    ^
      |                    ;
   11 |     n = (N - m) / (A + B);
      |     ~
Language: C++

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

int cnt_balls(int range_ball, int blue, int red){
    int balls=blue+red;
    int cnt_set=range_ball/balls;
    int cnt_left=range_ball%balls;
    if(balls!=0){
        return cnt_set*blue+min(blue,cnt_left);
    }
    else{
        return 0;
    }

int main(){
    int N,A,B; cin >> N >> A >> B;
    cout << cnt_balls(N,A,B) << endl;
}

Compiler output:
a.cc: In function 'int cnt_balls(int, int, int)':
a.cc:15:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   15 | int main(){
      |         ^~
a.cc:15:9: note: remove parentheses to default-initialize a variable
   15 | int main(){
      |         ^~
      |         --
a.cc:15:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:15:11: error: a function-definition is not allowed here before '{' token
   15 | int main(){
      |           ^
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:49: note: to match this '{'
    4 | int cnt_balls(int range_ball, int blue, int red){
      |                                                 ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<queue>
#include<algorithm>https://atcoder.jp/contests/abc158/submissions/me
using namespace std;
int main() {
	long long  n, a, b;
	cin >> n >> a >> b;



	long long ans = (n / (a + b)) * a + min(n % (a + b),a);

	
	cout << ans << endl;

	return 0;
}

Compiler output:
a.cc:4:25: warning: extra tokens at end of #include directive
    4 | #include<algorithm>https://atcoder.jp/contests/abc158/submissions/me
      |                         ^
a.cc:4:9: fatal error: algorithm>http: No such file or directory
    4 | #include<algorithm>https://atcoder.jp/contests/abc158/submissions/me
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	_int64 N,A,B,sum=0;
	scanf("%lld %lld %lld",&N,&A,&B);
	sum+=N/(A+B)*A;
	sum+=_cpp_min(N%(A+B),A);
	printf("%lld\n",sum);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: '_int64' was not declared in this scope
    6 |         _int64 N,A,B,sum=0;
      |         ^~~~~~
a.cc:7:33: error: 'N' was not declared in this scope
    7 |         scanf("%lld %lld %lld",&N,&A,&B);
      |                                 ^
a.cc:7:36: error: 'A' was not declared in this scope
    7 |         scanf("%lld %lld %lld",&N,&A,&B);
      |                                    ^
a.cc:7:39: error: 'B' was not declared in this scope
    7 |         scanf("%lld %lld %lld",&N,&A,&B);
      |                                       ^
a.cc:8:9: error: 'sum' was not declared in this scope
    8 |         sum+=N/(A+B)*A;
      |         ^~~
a.cc:9:14: error: '_cpp_min' was not declared in this scope
    9 |         sum+=_cpp_min(N%(A+B),A);
      |              ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i) 
using namespace std;
using ll = long long;
int main() {
 ll n,a,b;
 cin >> n >> a >> b ;
 ll d = a* n / (a+b );
 ll e = n % (a+b);
 ll tot ;
 tot = d+ min (a,e);

 cout << tot << endl ;

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

#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i<(n); ++i) 
using namespace std;
using ll = long long;
int main() {
 ll n,a,b;
 cin >> n >> a >> b ;
 ll d = a* n / (a+b );
 ll e = n % (a+b);
 ll tot = d+ min (a,e);

 cout << tot << endl ;

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

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define INF 1000000
#define watch(x) cout << setw(10) << "[" << (#x) << ":] " << (x) 
#define FORE(i,v,n) for(int i=v;i<n;i++)
#define FORI(i,v,n) for(int i=v;i<=n;i++)
#define vi vector<int>;
#define pii pair<int, int>

using namespace std;
using namespace __gnu_pbds;

//typedef tree <int, null_type, less<int> rb_tree_tag, tree_order_statistics_node_update> indexed_set;

int const MOD = 1000000007;

int test_case(){
	unsigned long long int n,a,b;
	cin >> n >> a >> b;
	if(a == 0) {
		cout << 0 << endl;
		return 0;
	}
	else{
		//cout << ((n/(a+b))*a + n%(a+b)); cout << endl;
		unsigned long long int answer = (n/(a+b))*a
		n = n/(a+b);
		answer += min(n%(a+b), a);
		cout << answer << endl;
	}
	
	return 0;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	int test=1;
	//cin >> test;
	for(int i=0;i<test;i++){
		test_case();
	}
	return 0;
}


Compiler output:
a.cc: In function 'int test_case()':
a.cc:27:17: error: expected ',' or ';' before 'n'
   27 |                 n = n/(a+b);
      |                 ^
Language: C++

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

int main(){
  int n, a, b;
  cin >> n >> a >> b;
  if(a != 0){
    printf(a + 1);
  }else {
    printf("0");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    8 |     printf(a + 1);
      |            ~~^~~
      |              |
      |              int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  long long N, A, B;
  cin>>N>>A>>B;
  long long r=(A+B);
  int times=N/r;
  int rest=N%r;
  int opai=0;
opai=min(rest,A);
  cout<<times*A+opai<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: no matching function for call to 'min(int&, long long int&)'
   10 | opai=min(rest,A);
      |      ~~~^~~~~~~~
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:10:9: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   10 | opai=min(rest,A);
      |      ~~~^~~~~~~~
/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
Language: C++

#include <iostream>
using namespace std;
int main() {
  int N, A, B;
  cin>>N>>A>>B;
  int times=N/(A+B);
  int rest=N%(A+B);
  int opai;
opai=min{rest, A};
  cout<<times*A+opai<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: cannot resolve overloaded function 'min' based on conversion to type 'int'
    9 | opai=min{rest, A};
      |      ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    
    int n, a, b;
    cin >> n >> a >> b;
    if (a <= 0) {
        cout << 0 << endl;
        return 0;
    }
    
    int c = n / (a + b);
    int ans = a * c;
    int amari  = n % (a + b);
    if (amari <= a) {
        ans += nm;
    } else {
        ans += a;
    }
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'nm' was not declared in this scope; did you mean 'n'?
   16 |         ans += nm;
      |                ^~
      |                n
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    
    int n, a, b;
    cin >> n >> a >> b;
    if (a <= 0) {
        cout << 0 << endl;
        return 0;
    }
    
    int c = n / (a + b);
    ll ans = a * c;
    ll amari  = n % (a + b);
    if (amari <= a) {
        ans += nm;
    } else {
        ans += a;
    }
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'll' was not declared in this scope
   13 |     ll ans = a * c;
      |     ^~
a.cc:14:7: error: expected ';' before 'amari'
   14 |     ll amari  = n % (a + b);
      |       ^~~~~~
      |       ;
a.cc:15:9: error: 'amari' was not declared in this scope
   15 |     if (amari <= a) {
      |         ^~~~~
a.cc:16:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |         ans += nm;
      |         ^~~
      |         abs
a.cc:16:16: error: 'nm' was not declared in this scope; did you mean 'n'?
   16 |         ans += nm;
      |                ^~
      |                n
a.cc:18:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |         ans += a;
      |         ^~~
      |         abs
a.cc:20:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

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

typedef long long ll;

int main () {
	ll n, a, b;
  	cin >> n >> a >> b;
  	int rem = n % (a + b);
  	int amari = min(rem, a);
  	cout << (a * n / (a + b)) + amari << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: no matching function for call to 'min(int&, ll&)'
   10 |         int amari = min(rem, a);
      |                     ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:10:24: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   10 |         int amari = min(rem, a);
      |                     ~~~^~~~~~~~
/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:
/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:10:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   10 |         int amari = min(rem, a);
      |                     ~~~^~~~~~~~
Language: C++

include<iostream>
using namespace std;
int main() {
	long long int N, A, B;
	cin >> N >> A >> B;
	cout << A * (N / (A + B)) + (N % (A + B)) << endl;
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin >> N >> A >> B;
      |         ^~~
a.cc:6:9: error: 'cout' was not declared in this scope
    6 |         cout << A * (N / (A + B)) + (N % (A + B)) << endl;
      |         ^~~~
a.cc:6:54: error: 'endl' was not declared in this scope
    6 |         cout << A * (N / (A + B)) + (N % (A + B)) << endl;
      |                                                      ^~~~
Language: C++

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

int main(){
	long long n, a, b;
	cin >> n >> a >> b;
	long long c = a+b;
	long long ans = a * (n /c);
	an += min(n%c, a);
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'an' was not declared in this scope; did you mean 'ans'?
    9 |         an += min(n%c, a);
      |         ^~
      |         ans
Language: C++

#include <bits/stdc++.h>
using namespace std;
unsigned long long int n, a, b, ans=0;
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin >> n >> a >> b;
	ans = a*(n/(a+b));
	long long int res=n%(a+b);
	ans += min(res, a);
	cout << ans;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: no matching function for call to 'min(long long int&, long long unsigned int&)'
   12 |         ans += min(res, a);
      |                ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:12:19: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'long long unsigned int')
   12 |         ans += min(res, a);
      |                ~~~^~~~~~~~
/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:
/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:12:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |         ans += min(res, a);
      |                ~~~^~~~~~~~
Language: C++

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


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

  long ong ans = 0;
  long long c = 0;
  c = n / (b + r);
  ans += c * b;
  if(n - c * (b + r) >= b){
    ans += b;
  }
  else{
    ans += n - c * (r + b);
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected initializer before 'ans'
   12 |   long ong ans = 0;
      |            ^~~
a.cc:15:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |   ans += c * b;
      |   ^~~
      |   abs
Language: Java

import java.util.Scanner;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int b = sc.nextInt();
    int r = sc.nextInt();
    int x = 0;
    if(b != 0) && r != 0) {
      x = n-r;
      System.out.println(x);
    } else if(r == 0) {
      System.out.println(b);
    } else {
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:9: error: illegal start of expression
    if(b != 0) && r != 0) {
               ^
Main.java:9: error: ';' expected
    if(b != 0) && r != 0) {
                        ^
Main.java:12: error: 'else' without 'if'
    } else if(r == 0) {
      ^
3 errors
Language: Java

import java.util.Scanner;
import java.math.BigInteger; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(Integer.toString(sc.nextInt()));
    BigInteger b = new BigInteger(Integer.toString(sc.nextInt()));
    BigInteger r = new BigInteger(Integer.toString(sc.nextInt()));
    BigInteger x = new BigInteger("0");
    if(b == 0) {
      System.out.println(x);
    } else {
      x = n-r;
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:10: error: bad operand types for binary operator '=='
    if(b == 0) {
         ^
  first type:  BigInteger
  second type: int
Main.java:13: error: bad operand types for binary operator '-'
      x = n-r;
           ^
  first type:  BigInteger
  second type: BigInteger
2 errors
Language: Java

import java.util.Scanner;
import java.math.BigInteger; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(sc.nextChar());
    BigInteger b = new BigInteger(sc.nextChar());
    BigInteger r = new BigInteger(sc.nextChar());
    BigInteger x = new BigInteger("0");
    if(b == 0) {
      System.out.println(x);
    } else {
      x = n-r;
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    BigInteger n = new BigInteger(sc.nextChar());
                                    ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:7: error: cannot find symbol
    BigInteger b = new BigInteger(sc.nextChar());
                                    ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:8: error: cannot find symbol
    BigInteger r = new BigInteger(sc.nextChar());
                                    ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:10: error: bad operand types for binary operator '=='
    if(b == 0) {
         ^
  first type:  BigInteger
  second type: int
Main.java:13: error: bad operand types for binary operator '-'
      x = n-r;
           ^
  first type:  BigInteger
  second type: BigInteger
5 errors
Language: Java

import java.util.Scanner;
import java.math.BigInteger; 
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(sc.nextInt().toString());
    BigInteger b = new BigInteger(sc.nextInt().toString());
    BigInteger r = new BigInteger(sc.nextInt().toString());
    BigInteger x = new BigInteger("0");
    if(b == 0) {
      System.out.println(x);
    } else {
      x = n-r;
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:6: error: int cannot be dereferenced
    BigInteger n = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:7: error: int cannot be dereferenced
    BigInteger b = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:8: error: int cannot be dereferenced
    BigInteger r = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:10: error: bad operand types for binary operator '=='
    if(b == 0) {
         ^
  first type:  BigInteger
  second type: int
Main.java:13: error: bad operand types for binary operator '-'
      x = n-r;
           ^
  first type:  BigInteger
  second type: BigInteger
5 errors
Language: Java

import java.util.Scanner;
import java.lang.Math;
class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(sc.nextInt().toString());
    BigInteger b = new BigInteger(sc.nextInt().toString());
    BigInteger r = new BigInteger(sc.nextInt().toString());
    BigInteger x = new BigInteger("0");
    if(b == 0) {
      System.out.println(x);
    } else {
      x = n-r;
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    BigInteger n = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:6: error: cannot find symbol
    BigInteger n = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:6: error: int cannot be dereferenced
    BigInteger n = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:7: error: cannot find symbol
    BigInteger b = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:7: error: cannot find symbol
    BigInteger b = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:7: error: int cannot be dereferenced
    BigInteger b = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:8: error: cannot find symbol
    BigInteger r = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:8: error: cannot find symbol
    BigInteger r = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:8: error: int cannot be dereferenced
    BigInteger r = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:9: error: cannot find symbol
    BigInteger x = new BigInteger("0");
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:9: error: cannot find symbol
    BigInteger x = new BigInteger("0");
                       ^
  symbol:   class BigInteger
  location: class Main
11 errors
Language: Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    BigInteger n = new BigInteger(sc.nextInt().toString());
    BigInteger b = new BigInteger(sc.nextInt().toString());
    BigInteger r = new BigInteger(sc.nextInt().toString());
    BigInteger x = new BigInteger("0");
    if(b == 0) {
      System.out.println(x);
    } else {
      x = n-r;
      System.out.println(x);
    }
  }
}


Compiler output:
Main.java:6: error: cannot find symbol
    BigInteger n = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:6: error: cannot find symbol
    BigInteger n = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:6: error: int cannot be dereferenced
    BigInteger n = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:7: error: cannot find symbol
    BigInteger b = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:7: error: cannot find symbol
    BigInteger b = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:7: error: int cannot be dereferenced
    BigInteger b = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:8: error: cannot find symbol
    BigInteger r = new BigInteger(sc.nextInt().toString());
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:8: error: cannot find symbol
    BigInteger r = new BigInteger(sc.nextInt().toString());
                       ^
  symbol:   class BigInteger
  location: class Main
Main.java:8: error: int cannot be dereferenced
    BigInteger r = new BigInteger(sc.nextInt().toString());
                                              ^
Main.java:9: error: cannot find symbol
    BigInteger x = new BigInteger("0");
    ^
  symbol:   class BigInteger
  location: class Main
Main.java:9: error: cannot find symbol
    BigInteger x = new BigInteger("0");
                       ^
  symbol:   class BigInteger
  location: class Main
11 errors