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

#include<stdio.h>

int main(void){
  int a=0;
  int b=0;
  int n=0;
  int out=1;
  scanf("%d",&a);
  scanf("%d",&b);
  while(out < b){
    out--
    out += a;
    n++;
  }
  printf("%d",n);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected ';' before 'out'
   11 |     out--
      |          ^
      |          ;
   12 |     out += a;
      |     ~~~
Language: C++

#include <iostream>

int main(void){
  
  int a, b;
  cin >> a >> b;
  
  int num = 1;
  int ans = 0;
  
  while(num < b){
  num += a-1;
  ans++; 
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> 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:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout << ans << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout << ans << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  int x = a-1;
  int y = b/x;
  int z = b%x;
  int g = y+1;
  if (y = 1 && z = 0){
    cout << 0 << endl;
  }
  else if (z==0 || z == 1){
    cout << y << endl;
  }
  else {
    cout << g << endl;
  }
  
}











Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: lvalue required as left operand of assignment
   11 |   if (y = 1 && z = 0){
      |           ~~^~~~
Language: C++

#include <stdio.h>

int socket = 0;
int kuchi = 1;

void setuzoku(int *x, int *y, int a)
{
	*x++;
	*kuchi += a - 1;
}

int main(int argc, char const *argv[])
{
	int a, b;
	scanf("%d%d", &a, &b);

	while kuchi < b:
	{
		setuzoku(&socket, &kuchi, a);
	}

	printf("%d\n", socket);

	return 0;
}

Compiler output:
a.cc: In function 'void setuzoku(int*, int*, int)':
a.cc:9:9: error: invalid type argument of unary '*' (have 'int')
    9 |         *kuchi += a - 1;
      |         ^~~~~~
a.cc: In function 'int main(int, const char**)':
a.cc:17:15: error: expected '(' before 'kuchi'
   17 |         while kuchi < b:
      |               ^~~~~
      |               (
a.cc:17:24: error: expected ')' before ':' token
   17 |         while kuchi < b:
      |               ~~~~~    ^
      |                        )
a.cc:17:24: error: expected primary-expression before ':' token
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B;
  cin >> A >> B;
  double ans = (double)A/B;
  double C = (double)A%B;
  if(C>0){
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   double C = (double)A%B;
      |              ~~~~~~~~~^~
      |              |         |
      |              double    int
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B;
  double C,ans;
  cin >> A >> B;
  double ans = (double)A/B;
  double C = (double)A%B;
  if(C>0){
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: redeclaration of 'double ans'
    8 |   double ans = (double)A/B;
      |          ^~~
a.cc:6:12: note: 'double ans' previously declared here
    6 |   double C,ans;
      |            ^~~
a.cc:9:10: error: redeclaration of 'double C'
    9 |   double C = (double)A%B;
      |          ^
a.cc:6:10: note: 'double C' previously declared here
    6 |   double C,ans;
      |          ^
a.cc:9:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    9 |   double C = (double)A%B;
      |              ~~~~~~~~~^~
      |              |         |
      |              double    int
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B
  double C,ans;
  cin >> A >> B;
  ans = (double)A/B;
  C = (double)A%B;
  if(C>0){
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'double'
    6 |   double C,ans;
      |   ^~~~~~
a.cc:7:15: error: 'B' was not declared in this scope
    7 |   cin >> A >> B;
      |               ^
a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   ans = (double)A/B;
      |   ^~~
      |   abs
a.cc:9:3: error: 'C' was not declared in this scope
    9 |   C = (double)A%B;
      |   ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B,C,ans;
  cin >> A >> B;
  ans = (double)A/B;
  C = (double)A%B;
  if(C>0){
    ans++;
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   C = (double)A%B;
      |       ~~~~~~~~~^~
      |       |         |
      |       double    int
Language: C++

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

int main (){
  
  int A,B,count = 0;
  cin >> A >> B;
  
  while(B > 0){
    B -= A - (count - 1);
    count++
  }
  
  cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before '}' token
   11 |     count++
      |            ^
      |            ;
   12 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int  n,m,ans;
  cin>>n>>m;
int ans=0;
int out=1;
while(out<m)
{
out--;
out+=n;
ans++;
}
cout<<ans;
 return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: redeclaration of 'int ans'
    7 | int ans=0;
      |     ^~~
a.cc:5:12: note: 'int ans' previously declared here
    5 |   int  n,m,ans;
      |            ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  int res = 0;
  int c = 1;
  while (c < b) {
    c += a - 1;
    res++:
  }
  cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: expected ';' before ':' token
   12 |     res++:
      |          ^
      |          ;
Language: C++

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

int main() {


int a,b;
cin >> a >> b;



int cnt = 0;
for(int i=1; i<=b; i += a-1){
  cnt++;
}

cout << res;

}

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

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

int main() {
  double a, b;
  cin >> a >> b
  cout << (int)ceil(b / a) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'cout'
    6 |   cin >> a >> b
      |                ^
      |                ;
    7 |   cout << (int)ceil(b / a) << endl;
      |   ~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]) {
     Scanner scan = new Scanner(System.in);
     int socketsInEachStrip = scan.nextInt();
     int emptySockets = scan.nextInt();
    
     int board = 0;
     if(emptySockets==1) {
    	 board=0;
     }else{
      	while(emptySockets!=0) {
       	 board++;
     	 emptySockets = emptySockets-scoketsInEachStrip;
    	 if(emptySockets<=0) {
           break;
         }else{
           emptySockets++;
         }
     }
   	}
    System.out.println(board);
    }
}

Compiler output:
Main.java:14: error: cannot find symbol
     	 emptySockets = emptySockets-scoketsInEachStrip;
     	                             ^
  symbol:   variable scoketsInEachStrip
  location: class Main
1 error
Language: C++

#include <iostream>
using namespace std;
int main() {
  	int a, b; cin >> a >> b;
  	int cnt = 0;
  	if (b == 1) cout << 0 << endl, return 0;
  	for (int i = 1; ; i++) {
    	int t = i * a - cnt;
      	if (t >= b) {
        	cout << i << endl;
          	break;
        }
      	cnt++;
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: expected primary-expression before 'return'
    6 |         if (b == 1) cout << 0 << endl, return 0;
      |                                        ^~~~~~
Language: C++

#include<iostream>
using namespace std;


int main(){
  int a,b;
  cin>>a>>b;
  int count=0,socket=1;
  while(socket<b){
    count++;
    socket=socket+a-1;
  }
  cout<<count;
  

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

#include <iostream>
using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	cout << (int)ceil((double)(b - 1) / (a - 1)) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'ceil' was not declared in this scope
    7 |         cout << (int)ceil((double)(b - 1) / (a - 1)) << endl;
      |                      ^~~~
Language: C

#include<stdio.h>
int main(){
  int i,n,a,b,count=0;
  scanf("%d%d",&a,&b);
  n=a-1;
  i=0;
  while(1+n*i<b){
    count++;
    i++}
  printf("%d\n",count);
  return 0;}


Compiler output:
main.c: In function 'main':
main.c:9:8: error: expected ';' before '}' token
    9 |     i++}
      |        ^
      |        ;
Language: C++

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

int main() {
  int a,b;cin>>a>>b;
  int sum=1,ans=0;
  while(sum<b)
      sum+=a-1;
      ans++;
    
  }
  cout<<ans;
}
      


Compiler output:
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout<<ans;
      |   ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

#define rep(i, N) for (int i = 0; i < N; i++)

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#include "Modulo.h"

double dist(double x, double y)
{
    return sqrt(x * x + y * y);
}

int main()
{
    int N;
    cin >> N;
    vector<int> x(N), y(N);
    rep(i, N) cin >> x[i] >> y[i];

    vector<int> x_irreducible(N), y_irreducible(N);
    rep(i, N)
    {
        int g = gcd(x[i], y[i]);
        if (g == 0)
            continue;
        x_irreducible[i] = x[i] / g;
        y_irreducible[i] = y[i] / g;
    }
    vector<int> x_modified(x), y_modified(y);
    rep(i, N) rep(j, i) if (x_irreducible[j] == x_irreducible[i] and y_irreducible[j] == y_irreducible[i])
    {
        x_modified[j] += x_modified[i];
        y_modified[j] += y_modified[i];
        x_modified[i] = y_modified[i] = 0;
    }
    auto it_x = x_modified.begin();
    auto it_y = y_modified.begin();
    while (it_x != x_modified.end())
    {
        if (*it_x == 0 and *it_y == 0)
        {
            it_x = x_modified.erase(it_x);
            it_y = y_modified.erase(it_y);
        }
        else
        {
            it_x++;
            it_y++;
        }
    }
    int n = x_modified.size();
    vector<int> x_perp(n), y_perp(n);
    rep(i, n)
    {
        x_perp[i] = -y_modified[i];
        y_perp[i] = +x_modified[i];
    }

    double max_dist = 0;
    rep(i, n)
    {
        ll xa, ya, xb, yb;
        xa = ya = xb = yb = 0;
        rep(j, n)
        {
            if (j == i)
                continue;

            if ((ll)x_perp[i] * x_modified[j] + (ll)y_perp[i] * y_modified[j] >= 0)
            {
                xa += x_modified[j];
                ya += y_modified[j];
            }
            else
            {
                xb += x_modified[j];
                yb += y_modified[j];
            }
        }
        vector<double> vec_comp;
        vec_comp.push_back(max_dist);
        vec_comp.push_back(dist(xa, ya));
        vec_comp.push_back(dist(xa + x_modified[i], ya + y_modified[i]));
        vec_comp.push_back(dist(xb, yb));
        vec_comp.push_back(dist(xb + x_modified[i], yb + y_modified[i]));
        max_dist = *max_element(vec_comp.begin(), vec_comp.end());
    }

    cout << fixed << setprecision(11);
    cout << max_dist << endl;
}

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

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

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for(int i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define RREP(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define endl '\n'

#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define watch(x) cout << (#x) << " is " << (x) << endl
#define pb push_back
#define mp make_pair
#define Pi 3.14159265358979
#define A first
#define B second

typedef long long ll;
typedef vector <int> vi;
typedef vector<ll> vl;
typedef pair <int, int> pi;
typedef pair <ll, int> pl;
typedef pair <ll, ll> pll;
typedef pair <double, double> pd;

//change these according to prob constraints
const int INF = 0x3f3f3f3f;
const int MAX = 100005;
const int MAX1 = 1005;
const int MAX2 = 105;
const int LEN = 105;
const int BASE = 1000000000;
const double EPS = 1e-7;
const int MOD = 1000000007;
//g++ -std=c++11 your_file.cpp -o your_program

ll mypow(ll a, ll b){
	ll ans=1;
	while(b){
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main(void){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ifstream in("");
	ofstream out("");
	clock_t begin = clock();
	int a, b;
	cin >> a >> b;
	FOR(i, 1, 21{
		if (i * a - i + 1 >= b) {
			cout << i << endl;
			return 0;
		}
	}
	clock_t end = clock();
    double esecs = double(end - begin) / CLOCKS_PER_SEC;
    //cout << esecs << " seconds" << endl;
	return 0;	
}

Compiler output:
a.cc:69:2: error: unterminated argument list invoking macro "FOR"
   69 | }
      |  ^
a.cc: In function 'int main()':
a.cc:59:9: error: 'FOR' was not declared in this scope
   59 |         FOR(i, 1, 21{
      |         ^~~
a.cc:59:12: error: expected '}' at end of input
   59 |         FOR(i, 1, 21{
      |            ^
a.cc:50:15: note: to match this '{'
   50 | int main(void){
      |               ^
Language: C++

#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<string>
#include<iostream>
#include<vector>
#include<cstdlib>
using namespace std;
 
template <class T> using V = vector<T>;
 
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
 
const long long INF = 1LL << 60;
 
using ll = long long;
using db = double;
using st = string;
using ch = char;
using bl = bool;
using vll = V<ll>;
using vpll =V<pair<ll,ll>>;
using vst = V<st>;
using vdb = V<db>;
using vch = V<ch>;
using vbl = V<bl>;
 
 
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rFOR(i,a,b) for(ll i=(a);i>(b);i--)
#define oFOR(i,a,b) for(ll i=(a);i<(b);i+=2)
#define bgn begin()
#define en end()
#define SORT(a) sort((a).bgn,(a).en)
#define REV(a) reverse((a).bgn,(a).en)
#define M(a,b) max(a,b)
#define rM(a,b) min(a,b)
#define fi first
#define se second
#define sz size()
#define gcd(a,b) __gcd(a,b)
#define co(a) cout<<a<<endl;
#define ci(a) cin>>a;
 

vll dp(100100);

ll sum(ll n) {
  ll m=0;
  FOR(i,0,20){
    m+=n%10;
    n/=10;
    if(n==0){
      break;
    }
  }
  return m;
}
 
 
const int MAX = 510000;
const int MOD = 1000000007;
 
long long fac[MAX], finv[MAX], inv[MAX];
 
void Comuse() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}
 
 
#define comuse Comuse()
 
ll combi(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
 
 
 
 
ll lcm(ll a,ll b){
  ll n;
  n=a/gcd(a,b)*b;
  return n;
}
 
 
/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/
 
 
signed main() {
  ll a,b;
  	ci(a>>b);
  ll ans=0;
  ll now=1
  while(now<b){
      now+=a-1;
  }
  co(ans)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:121:3: error: expected ',' or ';' before 'while'
  121 |   while(now<b){
      |   ^~~~~
Language: C++

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

int main(void)
{
  int a, b;
  cin >> a >> b;
  cout << (b + a - 1) / a;
  return 0;
}

Compiler output:
a.cc:2:17: error: 'sdt' is not a namespace-name
    2 | using namespace sdt;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout << (b + a - 1) / a;
      |   ^~~~
      |   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 a,b;
  	cin>>a>>b;
    if(b==1)cout<<0<<endl;
  	else if(b<a) cout<<1<<endl;
  	else cout<<b/(a-1) + ((b%(a-1))!=0)<<endl
    
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:50: error: expected ';' before '}' token
    8 |         else cout<<b/(a-1) + ((b%(a-1))!=0)<<endl
      |                                                  ^
      |                                                  ;
......
   11 | }
      | ~
Language: C++

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

int main() {
  
 	

    int a[2];
    for(int i=0;i<2;i++)
    {
    	cin>>a[i];
    }
    if(a[1]%a[0]==0)
    	cout<<(a[1]/a[0]);
    else 
    {

    for(int i=1;i<1000;i++)
    {
    	if((a[0]*i)-(i-1)))>=a[1])
    	{	cout<<i;
    		break;}

    }
}


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: expected primary-expression before ')' token
   20 |         if((a[0]*i)-(i-1)))>=a[1])
      |                           ^
Language: C++

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

int main() {
  
 	

    int a[2];
    for(int i=0;i<2;i++)
    {
    	cin>>a[i];
    }
    if(a[1]%a[0]==0)
    	cout<<(a[1]/a[0]);
    else 
    {

    for(int i=1;i<1000;i++)
    {
    	if((a[0]*i)-(i-1))>=a[1])
    	{	cout<<i;
    		break;}

    }
}


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:27: error: expected primary-expression before '>=' token
   20 |         if((a[0]*i)-(i-1))>=a[1])
      |                           ^~
Language: C++

#include <iostream>
using namespace std;
int main(){
 	int a,b;
  	cin>>a>>b;
     int c=1;
     int res=0;
      while(c<b){
       	res++;
        c+=a-1;
      }
      cout<<res<<endl;
    }
  
}

Compiler output:
a.cc:15:1: error: expected declaration before '}' token
   15 | }
      | ^
Language: C++

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

int main(void) {
	int A, B;
	cin >> A >> B;

	if (B == 1) {
		cout << 0 << endl;
		return;
	}
	int sum = 1;
	int plg = A;
	while (true) {
		if (B <= plg) {
			break;
		}
		sum++;
		plg += A - 1;
	}
	cout << sum << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |                 return;
      |                 ^~~~~~
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]) {
     Scanner scan = new Scanner(System.in);
     int socketsInEachStrip = scan.nextInt();
     int emptySockets scan.nextInt();
     int board = 0;
     if(emptySockets%socketsInEachStrip==0) {
      	board = emptySockets/socketsInEachStrip;
     }else{
     	board = (emptySockets/socketsInEachStrip)+1;
     }
      System.out.println(board);
    }
}

Compiler output:
Main.java:6: error: ';' expected
     int emptySockets scan.nextInt();
                     ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long a,b;
  cin >> a >> b;
  if(a>=b)
    return cout << 1 << '\n';
  a--;
  cout << 1+(a+b-1)/b << '\n';
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: cannot convert 'std::basic_ostream<char>' to 'int' in return
    8 |     return cout << 1 << '\n';
      |            ~~~~~~~~~~^~~~~~~
      |                      |
      |                      std::basic_ostream<char>
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  long long a,b;
  cin >> a >> b;
  if(a>=b)
    return cout << 1 << '\n';
  a--;
  cout << 1+(a+b-1)/b << '\'n;
}  

Compiler output:
a.cc:10:26: warning: missing terminating ' character
   10 |   cout << 1+(a+b-1)/b << '\'n;
      |                          ^
a.cc:10:26: error: missing terminating ' character
   10 |   cout << 1+(a+b-1)/b << '\'n;
      |                          ^~~~~
a.cc: In function 'int main()':
a.cc:8:22: error: cannot convert 'std::basic_ostream<char>' to 'int' in return
    8 |     return cout << 1 << '\n';
      |            ~~~~~~~~~~^~~~~~~
      |                      |
      |                      std::basic_ostream<char>
a.cc:11:1: error: expected primary-expression before '}' token
   11 | }
      | ^
Language: C++

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

int main(){
  int A,B;
  cin >> A >> B;

  int ports = 1;
  int taps = 0;
  
  if(B == 1){
    cout << 0;
    return 0
  }
  
  for(int i=1;i<=20;i++){
    taps++;
    ports = ports -1 + A;
    if(ports >= B){break;}
  }
  cout << taps;
    
  // 1  2
  // 2  2-1+2 = 3
  // 3  3 -1 +2 = 4
  // 1  A
  // 2  (A)-1+A = 2A -1
  // 3  (2A -1) - 1 + A = 3A -2  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: expected ';' before '}' token
   13 |     return 0
      |             ^
      |             ;
   14 |   }
      |   ~
Language: Java

import java.util.Scanner;
 
public class Main {
 
 
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt() - 1;
		int b = sc.nextInt() - 1;
		int total = 0;

		if(b != 1){
			total = (b+a-1)/a
		}
		System.out.println(total);
	}
}

Compiler output:
Main.java:13: error: ';' expected
			total = (b+a-1)/a
			                 ^
1 error
Language: C++

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

int main() {
  
  int a, b;
  cin >> a >> b;
  
  int s = a-1;
  int t = b-1;
  int ans = (t+s-1)/s;
  
  cout << ans << endl;
  
  return 0;
  
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> 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 | #inclue <bits/stdc++.h>
a.cc:13:3: error: 'cout' was not declared in this scope
   13 |   cout << ans << endl;
      |   ^~~~
a.cc:13:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:18: error: 'endl' was not declared in this scope
   13 |   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 | #inclue <bits/stdc++.h>
Language: C++

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

 
 
    ans = ceil(1.0 * (b-1) / (a-1));

    cout << ans << "\n";
}

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

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

int main() {
  int n,ia,b,c;
  cin >> a >> b;
  
  if(b==1){
    c=0; 
  }else if(a >= b){
    c = 1;
  }else{
    c = ((a-1)+(b-1)-1)/(a-1);
    c++;
  }
  cout << c << endl;
  
  return 0;
}

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

#include <iostream>
using namespace std;

int main() {
	int n,m;
	cin>>n>>m;
	int x=0;
	int s=1;
	if(m==1){
		cout<<"0"<<;
	}
	if(m>1){
		while(s<=m){
			s=s+n-1;
			x++;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:28: error: expected primary-expression before ';' token
   10 |                 cout<<"0"<<;
      |                            ^
Language: C++

solve [a, b] = f 0 (b-a) (a-1)
    where f n x y
            | x <= n*y  = n + 1
            | otherwise = f (n+1) x y

main = map read . words <$> getLine >>= print . f
    where f [a, b] = if b == 1 then 0 else solve [a, b]


Compiler output:
a.cc:1:1: error: 'solve' does not name a type
    1 | solve [a, b] = f 0 (b-a) (a-1)
      | ^~~~~
Language: C++

#include<bits/stdc++.h>
//#define int long long
 
using namespace std;
 
 
int main(){
 
 int a,b;
 cin>>a>>b;
  if(b==1){
    cout<<0<<endl;
    return 0;
  }
 int cur_sok=a;
 b-=a;
 if(b){
 	a--;
 	if(b%a)
 		ans++;
 	ans += b/a;
 	}
 cout<<ans<<endl;
 return 0;
 
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   20 |                 ans++;
      |                 ^~~
      |                 abs
a.cc:21:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |         ans += b/a;
      |         ^~~
      |         abs
a.cc:23:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |  cout<<ans<<endl;
      |        ^~~
      |        abs
Language: C++

#include <iostream>
using namespace std;

int main()
{
    int plugNum, need;
    cin >> plugNum >> need;
    if (2 <= plugNum && plugNum <= 20)
    {
        if (1 <= need && need <= 20)
        {
            int ans = 0;
            if (need == 0) {
                cout << ans << endl;
                return;
            }
            for(ans = 1; ;ans++) {
                int counter = (plugNum - 1) * ans + 1;
                if(counter >= need) {
                    break;
                }
            }
            cout << ans << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   15 |                 return;
      |                 ^~~~~~
Language: C++

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

int main(){

  int A,B; cin >> A >> B;
  int ans =0;
  int outlet = 1;
  while(outlet < B){
    outlet += A-1
    ans++;
  }
  cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected ';' before 'ans'
   10 |     outlet += A-1
      |                  ^
      |                  ;
   11 |     ans++;
      |     ~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <iostream>

#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int bigint;

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;
const int MD = (int)1e9 + 7; typedef vector<ll> VL;
void dbg(){ cerr << "\n"; }  template <class T, class ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }

int zmain(int a, int b)
{

	cin.tie(0); ios_base::sync_with_stdio(false);
	//int a,b, ans =0; 
	//cin >> a >>b;
	
	//if(a>= b){ puts("1"); return 0;}
	if(b <=0){ puts("0"); return 0;}
	int ans =1;
	int c = a;
	while(1){
		if(c >= b) break;
		c += (a-1);
		ans++;
	}
	
	//cout << ans <<"\n";
	return ans;
	
	
}
/*
int main(){

	rep2(a,2,21) rep2(b,1,21){
		dbg(a,b, zmain(a,b));
	}

}*/


Compiler output:
a.cc:10:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
   10 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
	int aaa = 0
	int c = 1
	while (c < b){
    	c += a-1;
    	aaa += 1;
	}
  cout<<aaa;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected ',' or ';' before 'int'
    8 |         int c = 1
      |         ^~~
Language: Java

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
      	int tmp = a;
      	int number = 1 ;
      	while(tmp < b)
        {
          tmp=tmp+(a-1);
          number++;            
        }
      	if (b =1) System.out.println(0);
        else   	System.out.println(number);
	}
}

Compiler output:
Main.java:14: error: incompatible types: int cannot be converted to boolean
      	if (b =1) System.out.println(0);
      	      ^
1 error
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <map>
#include <numeric>
#include <random>
#include <queue>
#include <deque>
#include <tuple>
#include <iomanip>
#include <iterator>
#include <functional>

using namespace std;
typedef long long ll;

const int INF = (1 << 30) - 1;
const ll INFLL= (1LL << 61) - 1;
const int MOD = 1000000007;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

int main(){
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int A,B;
  cin>>A>>B;
  cout<<(b-1)/(a-1)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:10: error: 'b' was not declared in this scope
   33 |   cout<<(b-1)/(a-1)<<endl;
      |          ^
a.cc:33:16: error: 'a' was not declared in this scope
   33 |   cout<<(b-1)/(a-1)<<endl;
      |                ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a,b count=1;
    cin >> a >> b;
    if(b==0)
    {
        cout << "0";
    }
    if( b<a || a==b)
       {
         cout << count;
       }
    else
    {
        for(int i=a;i<b;i=i+8)
        {
            if(b-(i-1)>a)
            {
                count++;
            }
            else
            {
                cout << count;
                exit;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:13: error: expected initializer before 'count'
    5 |     int a,b count=1;
      |             ^~~~~
a.cc:6:17: error: 'b' was not declared in this scope
    6 |     cin >> a >> b;
      |                 ^
a.cc:13:18: error: 'count' was not declared in this scope
   13 |          cout << count;
      |                  ^~~~~
a.cc:21:17: error: 'count' was not declared in this scope
   21 |                 count++;
      |                 ^~~~~
a.cc:25:25: error: 'count' was not declared in this scope
   25 |                 cout << count;
      |                         ^~~~~
Language: C++

scuss
Submission #7285779

Source Code 

Copy
Copy
#include<stdio.h>
 
int main()
  {
      int a,b,s;
      scanf("%d %d",&a,&b);
  if (b<a)
    s=1;
  else{
      s=b/a;
      if(s*a!=b)
        s=s+1;
    }
     printf("%d\n",s);
  return 0;
  }

Compiler output:
a.cc:2:12: error: stray '#' in program
    2 | Submission #7285779
      |            ^
a.cc:1:1: error: 'scuss' does not name a type
    1 | scuss
      | ^~~~~
a.cc: In function 'int main()':
a.cc:13:7: error: 'scanf' was not declared in this scope
   13 |       scanf("%d %d",&a,&b);
      |       ^~~~~
a.cc:21:6: error: 'printf' was not declared in this scope
   21 |      printf("%d\n",s);
      |      ^~~~~~
a.cc:9:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    8 | #include<stdio.h>
  +++ |+#include <cstdio>
    9 |
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  cin >> A >> B;
  
  for( int i=A; i<(B+A); i+=(A-1)){
    
    if(B=1){
      cout << 0 << endl;
    
    else if(i==B){
      cout << (B-1)/(A-1) << endl;
      break;
    }
    
    else if(i>B){
      cout << (i-1)/(A-1) << endl;
      break;
    }
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected '}' before 'else'
   13 |     else if(i==B){
      |     ^~~~
a.cc:10:12: note: to match this '{'
   10 |     if(B=1){
      |            ^
Language: C

#nclude<stdio.h>
int main()
{
  int x,y,z,w,a;
  scanf("%d %d",&x,&y);
  z=y%x;
  w=y/x;
  a=w+z;
  printf("%d",a);
  return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #nclude; did you mean #include?
    1 | #nclude<stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:5:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |   scanf("%d %d",&x,&y);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #nclude<stdio.h>
main.c:5:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |   scanf("%d %d",&x,&y);
      |   ^~~~~
main.c:5:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    9 |   printf("%d",a);
      |   ^~~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

/*    Don’t Quit
    
    When things go wrong as they sometimes will;
        When the road you’re trudging seems all uphill;
            When the funds are low, and the debts are high;
                And you want to smile, but you have to sigh;
                    When care is pressing you down a bit
                        Rest if you must, but don’t you quit.
*/
#pragma gcc optimize ("unroll-loop")
#pragma gcc optimize ("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0)
#define pb push_back
//#define mp make_pair
#define ff first
#define ss second
#define all(a) a.begin(),a.end()
#define int long long
const int MOD=1e9+7;
const int N=2e5+5;
int gcd(int n,int m)
{
    if(n==0)
        return m;
    else
        return gcd(m%n,n);
}
vector<int>q[1005];
int vis[1005];
int32_t main()
{
    IOS;
    int n,m;
    cin>>n>>m;
    if(m>=n)
    {
        cout<<"1"<<endl;
        return 0;
    }
    for(int i=1;;i++)
    {
        sum+=n;
        if(sum>=m)
        {
            cout<<i<<endl;
            return 0;
        }
        sum-=1;
    }



        
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:44:9: error: 'sum' was not declared in this scope
   44 |         sum+=n;
      |         ^~~
Language: C

#include <stdio.h>

int main(){
  int a,b;
  scanf("%d %d", a,b);
  if(a>=b){
    printf("1\n");
  }
  else{
    for(i=1;i<=100;i++){
      if(b<=sum){
        break;
      }
      sum = i*a;
    }
    printf("%d", i);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: 'i' undeclared (first use in this function)
   10 |     for(i=1;i<=100;i++){
      |         ^
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:13: error: 'sum' undeclared (first use in this function)
   11 |       if(b<=sum){
      |             ^~~
Language: C++

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

int main()
{
  int a,b,ans;
  cin>>a>>b;
  if( b==1)
    ans=0;
  else 
    ans =ceil( (b+1)/(a+1))
  
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before 'cout'
   11 |     ans =ceil( (b+1)/(a+1))
      |                            ^
      |                            ;
   12 | 
   13 |   cout<<ans;
      |   ~~~~
Language: C++

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

int main() {
int A,B,c=0;
  cin>>A>>B;
if(B==1){
  coout<<0<<endl;
}
  else if(A>=B){
  cout<<1<<endl;
}
else{
  for(int i=2;i<7000*B;i++){
    if(((A-1)*i+1)>=B){
      cout<<i<<endl;
      break;
    }
    }
} 
}


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

#include<stdio.h>

int main()
{
	int a,b,t;
  float c,k;
  
  scanf("%d%d",&a,&b);
  if(a>=b)
    k=1;
  else
  {c=(b-1)/(a-1);
     k=c+0.999;
   t=k;
  printf("%d",t);
  
  
}

Compiler output:
main.c: In function 'main':
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
	int a,b,t;
  float c,k;
  
  scanf("%d%d",&a,&b);
  if(a>=b)
    k=1;
  else
  {c=(b-1)/(a-1);
     k=c+1-(c%1);
   t=k;
  printf("%d",t);
  
  
}

Compiler output:
main.c: In function 'main':
main.c:13:14: error: invalid operands to binary % (have 'float' and 'int')
   13 |      k=c+1-(c%1);
      |              ^
main.c:18:1: error: expected declaration or statement at end of input
   18 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0; i<n ; ++i)
#define lpx(i,x,n) for(int i=x; i<n ; ++i)
#define all(v) v.begin() , v.end()
#define sz(v) (int(v.size()))
typedef unsigned long long ul;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;
typedef pair<char, int> pci;
typedef vector<pii> vp;
typedef vector<pci> vpc;
typedef pair<int,pii> piii;

int OO = 2e9;
const double eps = 1e-9 ;
const int N = 500000;
int mx = -1e9 , mn = 1e9 ;
int arr[N] ;

int dcmp(double x, double y)
{
    return fabs(x - y) <= eps ? 0 : x > y ? -1 : 1;
}
ul fac(int n)
{
    if(n > 1)
        return n * fac(n - 1);
    else
        return 1;
}



int main()
{

    int a, b , ans = 1;cin>> a>> b;
    int x=i-1;
    if(b == 1)cout<<" 0\n";
    else{
        while(a<b){
            a+= x;
            ++ans;
        }
        cout << ans << endl;
    }


    return 0;
}












Compiler output:
a.cc: In function 'int main()':
a.cc:43:11: error: 'i' was not declared in this scope
   43 |     int x=i-1;
      |           ^
Language: C++

#include<iostream>
// using namespace std;
// int main(){
//   int A,B;
//   int c=0;
//   int n=1;
//   cin >> A;
//   cin >> B;

//   if(A>=B){
//     cout << n <<'\n';
//   }
//   else{
//     while(C<B){
//       n++;
//       C=A+(n-1)*(A-1);
//     }
//     cout << n << '\n';
}

Compiler output:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
// using namespace std;
// int main(){
//   int A,B;
//   int c=0;
//   int n=1;
//   cin >> A;
//   cin >> B;

//   if(A>=B){
//     cout << n <<'\n';
//   }
//   else{
//     while(C<B){
//       n++;
//       C=A+(n-1)*(A-1);
//     }
//     cout << n << '\n';

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>

int main()
{
	int a,b,k;
  float c;
  
  scanf("%d%d",&a,&b);
  if(a>=b)
    k=1;
  else
  {c=(b-1)/(a-1);
     k=c;
   
   if(c%k==0)
      {
        k=c;
      }
  else
    k=c+1;
  }
  printf("%d",k);
  
  
}

Compiler output:
main.c: In function 'main':
main.c:15:8: error: invalid operands to binary % (have 'float' and 'int')
   15 |    if(c%k==0)
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a,b;
  cin>>a>>b;
  int c=a-1;
  ans=(b-a)/c;
  if (a=b) cout<<'1'<<endl;
  else cout<<'ans+1'<<endl;
}

Compiler output:
a.cc:10:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   10 |   else cout<<'ans+1'<<endl;
      |              ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   ans=(b-a)/c;
      |   ^~~
      |   abs
Language: C

#include<iostream>
using namespace std;
int main()
{
	int a,b;
	int count;
	cin>>a>>b;
	if(b>=a)
	{
		count=b/a;
		if(b%a) count=count+1;
	}
	if(a>b) count=1;
	cout<<count<<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;
 
int main() {
  int a,b;
  cin>>a>>b;
  int c=a-1
  int res=0;
  while(true){
    if (b-a<=c);
    for (int i=0; i<c; ++i){
      if (a-b>c) b-a=true;
    }
    
    if (b-a) break;
    for(int i=0; i<c; ++i){
      a-b/=c;
    }
    ++res;
  }
  cout<<res<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'int'
    8 |   int res=0;
      |   ^~~
a.cc:12:19: error: lvalue required as left operand of assignment
   12 |       if (a-b>c) b-a=true;
      |                  ~^~
a.cc:17:8: error: lvalue required as left operand of assignment
   17 |       a-b/=c;
      |       ~^~
a.cc:19:7: error: 'res' was not declared in this scope
   19 |     ++res;
      |       ^~~
a.cc:21:9: error: 'res' was not declared in this scope
   21 |   cout<<res<<endl;
      |         ^~~
Language: C++

#include <iostream>

using namepsace std;

int main()
{
  int a , b;
  cin >> a >> b;
  
  int d = a / b;
  int m = a % b;
  
  cout << d + (m == 0 ? 0 : 1) << endl;
  
return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namepsace'
    3 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |   cin >> 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 << d + (m == 0 ? 0 : 1) << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:35: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << d + (m == 0 ? 0 : 1) << endl;
      |                                   ^~~~
      |                                   std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>


void abc139_b(/* arguments */) {
  int a,b,d=1,c=0;
  scanf("%d %d",&a,&b);
  for (int i = 0;; i++) {
    if((d*a)<b && a !=0){
      c++;
      d++;
    }else if((d*a)>=b && a !=0){
      c++
      break;
    }else{
      break;
    }
  }
  printf("%d\n",c);
}
int main() {
  abc139_b();
  return 0;
}

Compiler output:
main.c: In function 'abc139_b':
main.c:12:10: error: expected ';' before 'break'
   12 |       c++
      |          ^
      |          ;
   13 |       break;
      |       ~~~~~
Language: C

#include<stdio.h>

int main()
{
	int a,b,k;
  float c;
  
  scanf("%d%d",&a,&b);
  if(a>=b)
    k=1;
  else
  {c=(b-1)/(a-1);
      if(c%1!=0)
      {
        k=c+1;
      }
  else
    k=c;
  }
  printf("%d",k);
  
  
}

Compiler output:
main.c: In function 'main':
main.c:13:11: error: invalid operands to binary % (have 'float' and 'int')
   13 |       if(c%1!=0)
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define ss second
#define ff first
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define mii map<int,int>
#define io ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main() {
	io
	int a,b;
  cin>>a>>b;
  if(b==1){
  	cout<<0;
    return;
  }
  int t=a;
  int ans=1;
  while(t<b){
  	t=t-1+a;
    ans++;
  }
  cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |     return;
      |     ^~~~~~
Language: Java

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

        int A = sc.nextInt();
        int B = sc.nextint();

        sc.close();

        
        if (B == 1) {
            System.out.println(0);
        } else if(A>=B){
            System.out.println(1);
        } else{
            int ans = 0;
            while (true){
                B = B - (A-1);
                ans++;
                if (B <= A){
                    break; 

                }
            }
            System.out.println(ans+1);
        }
    }
       
}       

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

#include<bits/stdc++.h>
 
using namespace std;
 
int main(){
	int a,b;
	cin>>a>>b;
	int sum=a;
	int i; 
	for(i=1;i<=20000;i++){
		sum=sum+a-1;
		if(sum>=b){
			break;
		}
		else 
	}
	if(a==b) cout<<1;
	else if(b==1)cout<<1;
	else if(b<a) cout<<1;
	else 
	cout<<i+1;
} 

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

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

int main() {
    int A;
    cin >> A;
    int B;
    cin >> B;
    int i;
    for(i=1;i++){
        if(i *(A -1) < B){
            i++;
        }else{
            break;
        }

    }
    cout << i << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: expected ';' before ')' token
   11 |     for(i=1;i++){
      |                ^
      |                ;
Language: Java

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

        int A = sc.nextint();
        int B = sc.nextint();

        sc.close();

        
        if (B == 0) {
            System.out.println(0);
        } else if(A>=B){
            System.out.println(1);
        } else{
            int ans = 0;
            while (true){
                B = B - (A-1);
                ans++;
                if (B <= A){
                    break; 

                }
            }
            System.out.println(ans+1);
        }
    }
       
}       

Compiler output:
Main.java:6: error: cannot find symbol
        int A = sc.nextint();
                  ^
  symbol:   method nextint()
  location: variable sc of type Scanner
Main.java:7: error: cannot find symbol
        int B = sc.nextint();
                  ^
  symbol:   method nextint()
  location: variable sc of type Scanner
2 errors