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

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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;

void Main()
{
	string S;
  	cin >> S;
  	int cnt = 0;
  	if(S[i] == 'a') cnt++;
  	if (cnt>0 && cnt<3) cout << "Yes" << endl;
  	else  cout << "No" << endl;
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
	return 0;
}

Compiler output:
a.cc: In function 'void Main()':
a.cc:22:14: error: 'i' was not declared in this scope
   22 |         if(S[i] == 'a') cnt++;
      |              ^
Language: C++


#define int long long
using namespace std;
constexpr int mod=1e9+7;
signed main(){
    string s;
    cin>>s;
    cout<<(s=="AAA"||s=="BBB"?"No":"Yes")<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string s;
      |     ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | 
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | 
a.cc:7:10: error: 's' was not declared in this scope
    7 |     cin>>s;
      |          ^
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<(s=="AAA"||s=="BBB"?"No":"Yes")<<endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:44: error: 'endl' was not declared in this scope
    8 |     cout<<(s=="AAA"||s=="BBB"?"No":"Yes")<<endl;
      |                                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 |
Language: C++

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

int main(){
  string s; cin >> s;
  string a = "AAA", b == "BBB";
  if(s == a || s == b) cout << "No" << endl;
  else cout << "Yes" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected initializer before '==' token
    6 |   string a = "AAA", b == "BBB";
      |                       ^~
a.cc:7:21: error: 'b' was not declared in this scope
    7 |   if(s == a || s == b) cout << "No" << endl;
      |                     ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    if (S = "AAA" || S == "BBB") cout << "No" << endl;
    else cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((int)((char)((((const char*)"AAA") != 0) || std::operator==<char, char_traits<char>, allocator<char> >(S, ((const char*)"BBB"))))))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |     if (S = "AAA" || S == "BBB") cout << "No" << endl;
      |         ~~^~~~~~~~~~~~~~~~~~~~~
      |           |
      |           std::__cxx11::basic_string<char>
Language: C++

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using in6 = int64_t;
using ind = double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  string s;
  cin >> s;
  if(s.at(1) == s.at(2) && s.at(0) == s.at(1)) cout << "No" << endl;
  else cout << "Yes" << ednl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:25: error: 'ednl' was not declared in this scope
   13 |   else cout << "Yes" << ednl;
      |                         ^~~~
Language: C++

S = input()
if len(set(S)) == 2:
    print('Yes')
else:
    print('No')


Compiler output:
a.cc:3:11: warning: multi-character character constant [-Wmultichar]
    3 |     print('Yes')
      |           ^~~~~
a.cc:5:11: warning: multi-character character constant [-Wmultichar]
    5 |     print('No')
      |           ^~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S = input()
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected primary-expression before 'long'
    9 |   cout << long long(n/(a+b)) * a + min(n%(a+b), a) << endl;
      |           ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: 'c' was not declared in this scope
    8 |   cin >> a  >> b >> c;
      |                     ^
a.cc:9:11: error: expected primary-expression before 'long'
    9 |   cout << long long(n/(a+b)) * a + min(n%(a+b), a) << endl;
      |           ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n,a,b;
  cin>>n>>a>>b;
  if(a==0){
    cout<<0<<endl;
  }
  else{
    ans=(n+(a+b)-1)/(a+b);
    rem=n%(a+b);
    ans+=min(rem,a);
    cout<<ans<<endl;
  }
}

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

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

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

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

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

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

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

    if (a == 0) {
        cout << 0 << endl;
        return 0;
    }
    else (b == 0) {
        cout << n << endl;
        return 0;
    }

    long long ans;
    if (n%(a+b) >= a) {
        ans = n/(a+b)*a + a;
        cout << ans << endl;
    }
    else {
        ans = n/(a+b)*a + n%(a+b);
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected ';' before '{' token
   12 |     else (b == 0) {
      |                  ^~
      |                  ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main() {
  ll N, A, B;
  cin >> N >> A >> B;
  if(A == 0 && B == 0) {
    cout << 0 << endl;
  }
  else {
    ll Q == N % (A+B);
    if(Q > A) {
      cout << (N / (A+B) + 1) * A << endl;
    }
    else {
      cout << (N / (A + B)) * A + Q << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected initializer before '==' token
   11 |     ll Q == N % (A+B);
      |          ^~
a.cc:12:8: error: 'Q' was not declared in this scope
   12 |     if(Q > A) {
      |        ^
Language: C++

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

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

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

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


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

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

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


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

 
/*CODE START HERE*/
int main() {
  int n,a,b;
  cin >> n >> a >> b;
  int c = n/(a+b) ;
  int d = n-c ;
  if ( d<=a){
    cout << a*c + d << endl;
  }else {
    cou << a*(c+1) << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:74:5: error: 'cou' was not declared in this scope; did you mean 'cos'?
   74 |     cou << a*(c+1) << endl;
      |     ^~~
      |     cos
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++)
#define rep3(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<int>>;
using ll = long long;

//----------素因数分解----------
vector<ll> prime_factorization(ll n){
  vector<ll> factors(n+1,0);
  rep3(i,n+1){
    if(i<=1) continue;
    while(n%i==0){
      n/=i;
      factors[i]++;
    }
  }
  return factors;
}

int main() {
  ll n,a,b;
  cin>>n>>a>>b;
  ll p=n/(a+b);
  ll q=n%(a+b);
  if(q<=a){
    ll r=q;
  }
  else{
    ll r=a;
  }
  cout<<p+r<<endl;
}


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

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

using ll = long long;

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

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

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

    cout<<ans<<"\n";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: expected ',' or ';' before 'ans'
   15 |     ans*=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;
using P = pair<int,int>;

ll x = 1e9 + 7; 
const int INF = 1001001001;


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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: expected ')' before ';' token
   15 |   ans += min(n%(a+b)-b, b;
      |             ~            ^
      |                          )
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main(){
  ll n , a , b;
  cin >> n >> a >> b;
  ll c = n/(a+b);
  ll d = n%(a+b):
  ll sum;
  if (d >= a){
   sum = c*a + a;
  }
  else{
   sum = c*a + d;
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ',' or ';' before ':' token
   12 |   ll d = n%(a+b):
      |                 ^
a.cc:15:4: error: 'sum' was not declared in this scope
   15 |    sum = c*a + a;
      |    ^~~
a.cc:18:4: error: 'sum' was not declared in this scope
   18 |    sum = c*a + d;
      |    ^~~
a.cc:20:11: error: 'sum' was not declared in this scope
   20 |   cout << sum << endl;
      |           ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
 
int main(){
  ll n , a , b;
  cin >> n >> a >> b;
  ll c = n/(a+b);
  ll d = n%(a+b):
  ll sum;
  if (d >= a){
    ll sum = c*a + a;
  }
  else{
   ll sum = c*a + d;
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ',' or ';' before ':' token
   12 |   ll d = n%(a+b):
      |                 ^
a.cc:20:11: error: 'sum' was not declared in this scope
   20 |   cout << sum << endl;
      |           ^~~
Language: C++

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


int main(){
  ll n , a , b;
  cin >> n >> a >> b;
  ll c = n/(a+b);
  ll d = n%(a+b):
  if (d >= a){
    ll sum = c*a + a
  }
  else{
   ll sum = c*a + d
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ',' or ';' before ':' token
   12 |   ll d = n%(a+b):
      |                 ^
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else{
      |   ^~~~
a.cc:18:3: error: expected ',' or ';' before '}' token
   18 |   }
      |   ^
a.cc:19:11: error: 'sum' was not declared in this scope
   19 |   cout << sum << endl;
      |           ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: 'n' was not declared in this scope
    8 |   ans += a * (n / (a + b));
      |               ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  ll N,A,B; cin >> N >> A >> B;
  int ans = N / (A+B) * A;
  int tmp = N % (A+B);
  ans += min(tmp,A);
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: no matching function for call to 'min(int&, ll&)'
   14 |   ans += min(tmp,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:14:13: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   14 |   ans += min(tmp,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:14:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   14 |   ans += min(tmp,A);
      |          ~~~^~~~~~~
Language: C++

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

int n, a, b;

void solve(){
    int tot = a + b;
    if (tot <= 0){
        cout << "0\n";
        return;
    }
    int ans = (n / tot) * a + ((n % tot) < a ? (n % tot) : a);
    cout << ans << "\n";
    return;
}


int main(){
   	ios::sync_with_stdio(false);
	cin.tie(0);
    int i = 10
    vector<long long int> t(10, 1e10);
	while (t[i]--){
	    cin >> n >> a >> b;
        solve();
        if (t[i] == 0 && i > 0) i--;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:5: error: expected ',' or ';' before 'vector'
   22 |     vector<long long int> t(10, 1e10);
      |     ^~~~~~
a.cc:23:16: error: 't' was not declared in this scope
   23 |         while (t[i]--){
      |                ^
Language: Java

import java.util.Scanner;

public class CountBalls {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);

		//全体のボールの数
		int n = sc.nextInt();
		//青いボールの数
		int a = sc.nextInt();
		//赤いボールの数
		int b = sc.nextInt();

		//小数点切り捨てた結果
		int num = n / (a + b);

		num = num * a;

		int amari = n % (a + b);

		//numが入力した値の比較判定
		if (amari <= a) {
			num += amari;

		} else if (amari > a) {
			num += a;
		}
		System.out.println(num);

		sc.close();
	}

}


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

#include<iostream>
int main()
{
  int n,a,b,c=0,c2=0;
  cin>>n>>a>>b;
  while(n)
  {
    c++;
    if(c==a)
      c2++;
    if(c2==b)c++;
  }
  cout<<c;
  return 0;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>n>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout<<c;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int n,a,b,c=0;
  cin>>n>>a>>b;
  a=n-b;
  cou<<a;
  return 0;
}
    

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

#include<stdio.h>
struct shop
{
    char name[30];
    int item_code;
    int price,quantity,manufacturing_date;
};


void display(struct shop s[],int n)
{
    printf("Name\tItem Code\tPrice\tQuantity\tManufacturing Date\n");

    for (int i = 1; i <=n; i++)
    {
        printf("%s\t%d\t\t%d\t%d\t\t%d\n",s[i].name,s[i].item_code,s[i].price,s[i].quantity,s[i].manufacturing_date);
    }
    
}


int main()
{
    int n;
    printf("Enter Number of products:");
    scanf("%d",&n);

    struct shop s[n];

    for(int i=1;i<=n;i++)
    {
        printf("Enter Name of Product %d:",i); fflush(stdin);
        gets(s[i].name);
        printf("Enter item code of Product %d:",i);
        scanf("%d",&s[i].item_code);
        printf("Enter price Product %d:",i);
        scanf("%d",&s[i].price);
        printf("Enter quantity of Product %d:",i);
        scanf("%d",&s[i].quantity);
        printf("Enter Manufacturing Date of Product %d:",i);
        scanf("%d",&s[i].manufacturing_date);

    }

    display(s,n);

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   33 |         gets(s[i].name);
      |         ^~~~
      |         getw
Language: Java

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

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

}


Compiler output:
Main.java:1: error: illegal character: '#'
#include<bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include<bits/stdc++.h>
        ^
Main.java:7: error: not a statement
   cin>>n>>a>>b;
            ^
Main.java:13: error: not a statement
    cout<<x + (n/(a+b))*a;
        ^
Main.java:16: error: not a statement
    cout<<a;
        ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
6 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    unsigned long long int n,a,b;
    cin>>n>>a>>b;
    if(n<a)
    cout<<n;
    else if(n>=a&&<<b)
    cout<<a;
    if(n>a+b)
    {
        if(n%(a+b)<a)
        cout<<n*a/(a+b)+n%(a+b);
        else
        cout<<n*a/(a+b)+a;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before '<<' token
    9 |     else if(n>=a&&<<b)
      |                   ^~
Language: C++

#include <algorithm>
#include <iostream>
#include <stdio.h>

using namespace std;

int main() {
  int64_t N, A, B;
  cin >> N >> A >> B;
  int64_t n = 0;
  int res = 0;
  while (n < N) {
    n += A + B;
    res += A;
  }
  res += min(B - n + N, 0LL);
  printf("%d\n", res);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: no matching function for call to 'min(int64_t, long long int)'
   16 |   res += min(B - n + N, 0LL);
      |          ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 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:13: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   16 |   res += min(B - n + N, 0LL);
      |          ~~~^~~~~~~~~~~~~~~~
/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:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   16 |   res += min(B - n + N, 0LL);
      |          ~~~^~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  long long N, A, B;
  cin >> N >> A >> B;
  cout <<N/(A+B)*A+min(N%(A+B), A) << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:44: error: expected '}' at end of input
    7 |   cout <<N/(A+B)*A+min(N%(A+B), A) << endl;
      |                                            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  long long N, A, B;
  cin >> N >> A >> B;
  if(N%(A+B)==0) cout << N/(A+B) * A << endl;
  else { cout << (N/(A+B)+1)*A << endl;
    
}


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

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

int main() {
  long long N, A, B;
  cin >> N >> A >> B;
  if(N%(A+B)==0) cout << N/(A+B) * B << endl;
  else { cout << (N/(A+B)+1)*B << endl;
    
}

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

//CODING ME ACCHHA KARNEKA HAI TERKO TO BAS PRACTICE KARTE REH
#include <bits/stdc++.h>
#define pragma
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define aisort sort(a,a+n)
#define adsort sort(a,a+n,greater<ll>())
#define PI 2 * acos(0)

typedef pair<ll, ll> pii;
typedef pair<ll, pii> piii;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef vector<pii> vii;
typedef vector<piii> viii;
typedef set<ll> Set;

const ll maxs = 1e5+3;
const ll maxs1 = 1e3+4;
const ll mod = 1e9 + 7;

//MODULO OPEARTIONS
    inline ll add(ll a, ll b) { return (mod + a + b) % mod; }
    inline ll sub(ll a, ll b) { return (a - b + mod) % mod; }
    inline ll mul(ll a, ll b) { return (1ll * a * b) % mod; }

//POWER
    ll fastpow(ll x,ll y)
    {ll res = 1;x = x % mod;while (y > 0){ if (y & 1)res = (res * x) % mod; y = y >> 1 ; x = (x * x) % mod; } return res;}

//MODULAR INVERSE
    ll inv(ll x){ return fastpow(x , mod - 2);}
    
//PRIME
    bool isPrime(ll n) { if (n <= 1)  return false; if (n <= 3)  return true;if (n%2 == 0 || n%3 == 0) return false; for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0) return false; return true; } 


int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
   ll n,a,b;
   cin>>n>>a>>b;
   ll s,t;
   s=n/(a+b);
   r=n%(a+b);
   if(r<=b)
   cout<<(s*b)+r;
   else
   cout<<(s*b);
}




Compiler output:
a.cc: In function 'int main()':
a.cc:50:4: error: 'r' was not declared in this scope
   50 |    r=n%(a+b);
      |    ^
Language: C++

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

int main(){
  int N,A,B;cin>>N>>A>>B;
  int ans = 0;
  ans = n/(A+B) + min(N%(A+B),A);
  cout<<ans<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'n' was not declared in this scope
    7 |   ans = n/(A+B) + min(N%(A+B),A);
      |         ^
Language: C++

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

int main(){
  int N,A,B;cin>>N>>A>>B;
  ans = 0;
  ans = n/(A+B) + min(N%(A+B),A);
  cout<<ans<<endl;
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans = 0;
      |   ^~~
      |   abs
a.cc:7:9: error: 'n' was not declared in this scope
    7 |   ans = n/(A+B) + min(N%(A+B),A);
      |         ^
Language: C++

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

int main(){
  int N,A,B;cin>>N>>A>>B;
  ans = 0;
  ans = n/(a+b) + min(n%(a+b),a);
  cout<<ans<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans = 0;
      |   ^~~
      |   abs
a.cc:7:9: error: 'n' was not declared in this scope
    7 |   ans = n/(a+b) + min(n%(a+b),a);
      |         ^
a.cc:7:12: error: 'a' was not declared in this scope
    7 |   ans = n/(a+b) + min(n%(a+b),a);
      |            ^
a.cc:7:14: error: 'b' was not declared in this scope
    7 |   ans = n/(a+b) + min(n%(a+b),a);
      |              ^
Language: C

#include<stdio.h>

int main(void)
{
  int N,A,B;
  int N = A + B;
  scanf("%d%d",&A,&B);
  printf("%d",A);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: redeclaration of 'N' with no linkage
    6 |   int N = A + B;
      |       ^
main.c:5:7: note: previous declaration of 'N' with type 'int'
    5 |   int N,A,B;
      |       ^
Language: C

#include<stdio.h>

int main(void)
{
  int N,A,B;
  scanf("%d%d",&N,&A,&B);
  int N = A + B;
  printf("%d",A);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: redeclaration of 'N' with no linkage
    7 |   int N = A + B;
      |       ^
main.c:5:7: note: previous declaration of 'N' with type 'int'
    5 |   int N,A,B;
      |       ^
Language: C

#include<stdio.h>

int main(void)
{
  int N,A,B;
  scanf("%d%d",&N,&A,&B);
  print("%d",A);
  
  return 0;
}
  
  

Compiler output:
main.c: In function 'main':
main.c:7:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |   print("%d",A);
      |   ^~~~~
      |   printf
Language: C++

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

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

long long div, sur;
div = n / (a+b);
sur = n % (a+b);
sur = min(sur, a);
cout << div*a + sur << endl;
}

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

int main(){
   long long int N,A,B,tot;
   cin>>N>>A>>B;
   long long int sum=A+B;
   long long int Q=A*(N/sum);
   long long int R=N%sum;
   long long tot=Q+min(R,A);
   long long int power = pow(10,18);
  if(N>=1&&A>=0&&B>=0&&sum>0&&N<=power&&sum<=power){
   cout<<tot;
  }
   return 0;
   
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:4: error: 'cin' was not declared in this scope
    3 |    cin>>N>>A>>B;
      |    ^~~
a.cc:7:14: error: redeclaration of 'long long int tot'
    7 |    long long tot=Q+min(R,A);
      |              ^~~
a.cc:2:24: note: 'long long int tot' previously declared here
    2 |    long long int N,A,B,tot;
      |                        ^~~
a.cc:7:20: error: 'min' was not declared in this scope; did you mean 'main'?
    7 |    long long tot=Q+min(R,A);
      |                    ^~~
      |                    main
a.cc:8:26: error: 'pow' was not declared in this scope; did you mean 'power'?
    8 |    long long int power = pow(10,18);
      |                          ^~~
      |                          power
a.cc:10:4: error: 'cout' was not declared in this scope
   10 |    cout<<tot;
      |    ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a,b,ans=0,sum,count;
    cin>>n>>a>>b;
    if(a!=0){
    count=n/(a+b);
    ans=a*count;
    sum=n%(a+b);
    if(sum<a){
    ans=ans+sum;
    }
    else if(sum>=a){
    ans=ans+a;
    cout<<ans;
    }
    else{
    cout<<"0";
    }
}


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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a,b,ans=0,sum,count;
    cin>>n>>a>>b;
    if(a!=0){
    count=n/(a+b);
    ans=a*count;
    rem=n%(a+b);
    if(sum<a){
    ans=ans+sum;
    }
    else if(sum>=a){
    ans=ans+a;
    cout<<ans;
    }
    else{
    cout<<"0";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'rem' was not declared in this scope; did you mean 'drem'?
    9 |     rem=n%(a+b);
      |     ^~~
      |     drem
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        long n = scanner.nextLong();
        long A = scanner.nextLong();
        long B = scanner.nextLong();
 
        long s = n / (a + b);
        long t = n % (a + b);
        long count = 0;
 
        count = s * A;
        if(t >= A){
            count += A;
        }else{
            count += t;
        }
        System.out.println(count);
        
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
        long s = n / (a + b);
                      ^
  symbol:   variable a
  location: class Main
Main.java:10: error: cannot find symbol
        long s = n / (a + b);
                          ^
  symbol:   variable b
  location: class Main
Main.java:11: error: cannot find symbol
        long t = n % (a + b);
                      ^
  symbol:   variable a
  location: class Main
Main.java:11: error: cannot find symbol
        long t = n % (a + b);
                          ^
  symbol:   variable b
  location: class Main
4 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        int C = A + B;
        int result;
        int i;
        if((C = 0)){
            result = 0;
        }else{
            result = N % (A + B);
        }
        if(A == 0 || (A + B) == 0){
            i = 0;
        }else{
            i = N / (A + B) * A;
        }

        i = result + i;

        System.out.println(i);
    }
}

Compiler output:
Main.java:12: error: incompatible types: int cannot be converted to boolean
        if((C = 0)){
              ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        if((A + B = 0)){
            int result = 0;
        }
        result = N % (A + B);
        if(A == 0 || (A + B) == 0){
            int i = 0;
        }
        i = N / (A + B) * A;

        i = result + i;

        System.out.println(i);
    }
}

Compiler output:
Main.java:9: error: unexpected type
        if((A + B = 0)){
              ^
  required: variable
  found:    value
Main.java:12: error: cannot find symbol
        result = N % (A + B);
        ^
  symbol:   variable result
  location: class Main
Main.java:16: error: cannot find symbol
        i = N / (A + B) * A;
        ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
        i = result + i;
        ^
  symbol:   variable i
  location: class Main
Main.java:18: error: cannot find symbol
        i = result + i;
            ^
  symbol:   variable result
  location: class Main
Main.java:18: error: cannot find symbol
        i = result + i;
                     ^
  symbol:   variable i
  location: class Main
Main.java:20: error: cannot find symbol
        System.out.println(i);
                           ^
  symbol:   variable i
  location: class Main
7 errors
Language: Java

import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int A = scanner.nextINt();
        int B = scanner.nextInt();
        
        int result = N % (A + B);
        int i = 0;

        for(i = 0; i <= N; i++){
            i = A + B;
        }
        if(i > N){
            i = i - B;
        }
        if(i > N){
            i = i - A;
        }

        i = i + result;

        System.out.println(i);
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        int A = scanner.nextINt();
                       ^
  symbol:   method nextINt()
  location: variable scanner of type Scanner
1 error
Language: C++

using namespace std;
#define ll long long
 
int main(int qtd, char* nome[])
{
	
 
	ll n, a, b;
	cin >> n >> a >> b;
	ll ans = n/(a+b)*a;
	cout << ans + min(n%(a+b), a) << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         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:9: error: 'cout' was not declared in this scope
   11 |         cout << ans + min(n%(a+b), a) << endl;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:23: error: 'min' was not declared in this scope; did you mean 'main'?
   11 |         cout << ans + min(n%(a+b), a) << endl;
      |                       ^~~
      |                       main
a.cc:11:42: error: 'endl' was not declared in this scope
   11 |         cout << ans + min(n%(a+b), a) << endl;
      |                                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: Java

import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
    long  n=sc.nextLong();
        long a=sc.nexLong();
        long b=sc.nextLong();

        long so=n/(a+b);
        if(a==0){
            System.out.println('0');
            System.exit(0);
        }else if(n%(a+b)<=a){
            System.out.println(a*so + n%(a+b));
            System.exit(0);
        }else{
            System.out.print(a*so+a);
        }
    }
}

Compiler output:
Main.java:9: error: cannot find symbol
        long a=sc.nexLong();
                 ^
  symbol:   method nexLong()
  location: variable sc of type Scanner
1 error
Language: C++

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

int main(int qtd, char* nome[])
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	ll n, a, b;
	cin >> n >> a >> b;
	ll ans = n/(a+b)*a;
	cout << (!ans? 0: ans + min(n%(a+b), a) << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:13:49: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   13 |         cout << (!ans? 0: ans + min(n%(a+b), a) << endl;
      |                           ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:13:56: error: expected ')' before ';' token
   13 |         cout << (!ans? 0: ans + min(n%(a+b), a) << endl;
      |                 ~                                      ^
      |                                                        )
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:26: error: 'min' was not declared in this scope; did you mean 'std::min'?
    5 |   std::cout<<(N/(A+B))*A+min(N%(A+B),A);
      |                          ^~~
      |                          std::min
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: 'std::min' declared here
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a,b,c;
  cin >> a >> b >> c;
  int ans = a/(b+c) *b;
  int rem = a%(b+c);
  int ra =min(rem,b);
  cout << ans + ra << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: no matching function for call to 'min(int&, long int&)'
    8 |   int ra =min(rem,b);
      |           ~~~^~~~~~~
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:8:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
    8 |   int ra =min(rem,b);
      |           ~~~^~~~~~~
/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:8:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |   int ra =min(rem,b);
      |           ~~~^~~~~~~