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

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

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

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

    }
    cout << i << endl;
}



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

#include <iostream>

using namespace std;

int main(){
  int A, B;
  
  cin >> A >> B;
  
  if ((A == 2)&&(B == 1)) cout << 1 << endl;
  else if{
    for (int i = 1; i < 200; i++){
      if (A * i - (i - 1) >= B){
        cout << i << endl;
        return 0;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected '(' before '{' token
   11 |   else if{
      |          ^
      |          (
Language: C++

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

int main() {
int A,B,c=0;
  cin>>A>>B;
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:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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

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

    }
    cout << i << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before '}' token
   13 |             i++
      |                ^
      |                ;
   14 |         }else{
      |         ~       
a.cc:19:13: error: 'i' was not declared in this scope
   19 |     cout << i << endl;
      |             ^
Language: C++

#include <iostream>

using namespace std;

int main(){
  int A, B;
  
  cin >> A >> B;
  
  if (A == 2)&&(B == 1) cout << 1 << endl;
  else if{
    for (int i = 1; i < 200; i++){
      if (A * i - (i - 1) >= B){
        cout << i << endl;
        return 0;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected identifier before '(' token
   10 |   if (A == 2)&&(B == 1) cout << 1 << endl;
      |                ^
a.cc:11:10: error: expected '(' before '{' token
   11 |   else if{
      |          ^
      |          (
Language: C++

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

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

#include <iostream>

using namespace std;

int main(){
  int A, B;
  
  cin >> A >> B;
  
  if (A == 2)&&(B == 1) cout << 1 << endl;
  else if{
 　for (int i = 1; i < 200; i++){
      if (A * i - (i - 1) >= B){
        cout << i << endl;
        return 0;
      }
  }
  }
}

Compiler output:
a.cc:12:2: error: extended character 　 is not valid in an identifier
   12 |  　for (int i = 1; i < 200; i++){
      |  ^
a.cc: In function 'int main()':
a.cc:10:16: error: expected identifier before '(' token
   10 |   if (A == 2)&&(B == 1) cout << 1 << endl;
      |                ^
a.cc:11:10: error: expected '(' before '{' token
   11 |   else if{
      |          ^
      |          (
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'k' was not declared in this scope
    8 |                 b=k+b-1;
      |                   ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(void)
{
	int a = 2, b = 1;
	int count = 1, i = 0;

	scanf_s("%d %d", &a, &b);

	while (a < b)
	{
		a = a - 1 + a;
		count++;
	}

	printf("%d", count);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |         scanf_s("%d %d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

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

void main()
{
	int s,r,n;
  	n=0;
	int total=0;
    if(s>=r)
    {
      n=1;
    }
  	else
    {
		while(total<=r)
        {
          	total+=s-1;
          	n++;
        }
    }
  cout<<n;
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   cout<<n;
      |   ^~~~
      |   std::cout
In file included from a.cc:2:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

int main() {
int A,B,c=0;
  cin>>A>>B;
 int i=1;
  while{
   if(i<B){
     c++;
   i+=A-1;
     continue;
   }
    else{
      break;
    }
  }
  cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: expected '(' before '{' token
    8 |   while{
      |        ^
      |        (
a.cc:8:8: error: expected primary-expression before '{' token
a.cc:8:8: error: expected ')' before '{' token
    8 |   while{
      |        ^
      |        )
Language: C

#include <stdio.h>
int main(void){
int i,t,s,A,B;
 scanf("%d",&A);
 scanf("%d",&B);
  s=A
  for(t=1;s>=B;t++){
  s=s+A-t;
  }
 i=t;
  printf("%d",i);
  return 0;
 }
  









Compiler output:
main.c: In function 'main':
main.c:6:6: error: expected ';' before 'for'
    6 |   s=A
      |      ^
      |      ;
    7 |   for(t=1;s>=B;t++){
      |   ~~~
Language: C++

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

int main() {
int A,B,c=0;
  cin>>A>>B;
 while{
   if(i<B){
     c++;
   i+=A-1;
     continue;
   }
    else{
      break;
    }
  }
  cout<<c<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: expected '(' before '{' token
    7 |  while{
      |       ^
      |       (
a.cc:7:7: error: expected primary-expression before '{' token
a.cc:7:7: error: expected ')' before '{' token
    7 |  while{
      |       ^
      |       )
a.cc:8:7: error: 'i' was not declared in this scope
    8 |    if(i<B){
      |       ^
Language: C++

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

void main()
{
	int s,r,n;
  	n=0;
  	cin>>s>>r;
	int total=0;
    if(s>=r)
    {
      n=1;
    }
  	else
    {
		while(total<=r)
        {
          	total+=s-1;
          	n++;
        }
    }
  cout<<n;
}

Compiler output:
a.cc:2:9: fatal error: iostream.h: No such file or directory
    2 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

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

void main()
{
	int s,r,n;
  	n=0;
	int total=0;
    if(s>=r)
    {
      n=1;
    }
  	else
    {
		while(total<=r)
        {
          	total+=s-1;
          	n++;
        }
    }
  cout<<n;
}

Compiler output:
a.cc:2:9: fatal error: iostream.h: No such file or directory
    2 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  count=1;
  int rem=0;
  rem=b%a;
  cout<<count+rem;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: expected unqualified-id before 'long'
    4 |   long s=1,long=0;
      |            ^~~~
a.cc:10:7: error: 'c' was not declared in this scope
   10 |     ++c;
      |       ^
a.cc:12:9: error: 'c' was not declared in this scope
   12 |   cout<<c<<endl;
      |         ^
Language: C++

int main() {
  int i;
  int a,b,d;
  cin >> a >> b;
  for(i = 1; i < 8; i++){
  d = b - a * i - (i - 1);  
  if(b == 1){
    cout << 0 << endl;
    break;
  }
  if(d <= 0) {
    cout << i << endl;
    break;
  }
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin >> a >> b;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << 0 << endl;
      |     ^~~~
a.cc:8:18: error: 'endl' was not declared in this scope
    8 |     cout << 0 << endl;
      |                  ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << i << endl;
      |     ^~~~
a.cc:12:18: error: 'endl' was not declared in this scope
   12 |     cout << i << endl;
      |                  ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <maap>
#include <sstream>
#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <iomanip>
#include <fstream>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = (1 << 30);
const ll inf = (1LL << 60LL);
const int  maxn = 1e5 + 5;

int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false);
	int a, b;
  cin >> a >> b;
  int ma = max(a, b);
  int mn = min(a, b);
  ma += mn;
  ma--;
  cout << ma / mn << endl;
  return 0;
}


Compiler output:
a.cc:5:10: fatal error: maap: No such file or directory
    5 | #include <maap>
      |          ^~~~~~
compilation terminated.
Language: C

#include <stdio.h>
int main(void)
{
  int A,B;
  scanf("%d %d", A, B);
  int n = 0;
  int c = 1;
  for(c <= B){
    n++;
    c = c - 1 + A;
  }
  printf("%d\n", n);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: expected ';' before ')' token
    8 |   for(c <= B){
      |             ^
      |             ;
main.c:8:13: error: expected expression before ')' token
Language: C++

#include<iostream>
    using namespace std;
    int main()
    {
      int a;
      int b;
      std::cin >> a;
      std::cin >> b;

      int n = 1;
      int i = 0;

      while (n < b) {
        n += (a-1)*(i+1)
        i++;
      }

      std::cout << i << '\n';
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: expected ';' before 'i'
   14 |         n += (a-1)*(i+1)
      |                         ^
      |                         ;
   15 |         i++;
      |         ~
Language: C

include <stdio.h>
int main(void)
{
  int A,B;
  scanf("%d %d", A, B);
  int n = 0;
  int c = 1;
  for(c <= B){
    n++;
    c = c - 1 + A;
  }
  printf("%d\n", n);
  return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: expected '}' before 'else'
   12 |         else if (i * A - (i - 1) >= B){
      |         ^~~~
a.cc:9:20: note: to match this '{'
    9 |         if (B == 1){
      |                    ^
Language: C++

int main()
{
    int a, b, cnt=1;
    cin >> a >> b;
    
    if(b==1){ cout << 0; return 0; }
    
    else{
        int num = a;
        while(num<b){
            num = num + a - 1;
            cnt++;
        }
        
        cout << cnt;
        return 0;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> a >> b;
      |     ^~~
a.cc:6:15: error: 'cout' was not declared in this scope
    6 |     if(b==1){ cout << 0; return 0; }
      |               ^~~~
a.cc:15:9: error: 'cout' was not declared in this scope
   15 |         cout << cnt;
      |         ^~~~
Language: Java

import java.util.Scanner;

public class AtcoderBeginner139B {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        if (B == A) {
            System.out.println(B / A);
        } else {
            int answer = ((B / A) + 1) * A - B / A;
            if (answer >= B) {
                System.out.println((B / A) + 1);
            } else {
                for (int i = (B / A); i < 300; i++) {
                    answer = (i + 1) * A - i;
                    if (answer >= B) {
                        System.out.println(i);
                        break;
                    }
                }
            }
        }
    }
}


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

#include <cfenv>
#include <cmath>
#include <iostream>

void test(double x)
{
  std::feclearexcept(FE_ALL_EXCEPT);
  std::cout << "floor(" << x << ") = " << std::floor(x) << '\n';
  std::cout << "FE_INEXACT = " << std::boolalpha << (std::fetestexcept(FE_INEXACT) != 0) << "\n\n";
}

int main(){
int A, B;
  cin >> A >>B;
 int count;
  count=floor((B-A)/(A-1));
  
  
 
cout << count << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 |   cin >> A >>B;
      |   ^~~
      |   std::cin
In file included from a.cc:3:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:20:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   20 | cout << count << 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:20:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   20 | cout << count << 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 sum=a;
	int i; 
	if(a==b){
		cout<<1;
		continue; 
	}
	for(i=1;i<=200;i++){
		sum=sum+a-1;
		if(sum>=b){
			break;
		}
	}
	cout<<i+1;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: continue statement not within a loop
   12 |                 continue;
      |                 ^~~~~~~~
Language: C++

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

int main(){
  int A;
  int B;
  int i=1;
  int k=1;
  cin >> A >> B;
  while(k<=B){
    k = k-1+A;
    if(k<B){
      i++;
    }
    else if(B = 0){
      cout << 0 << endl;
      break;
    }
    else if(k>=B){
      cout << i << endl;
      break;
  }
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'i' was not declared in this scope
    8 |     A + (A - 1) * i;
      |                   ^
Language: C

#include<stdio.h>
int main()
{
    int a, b;
	int tapcount = 1; //タップ数
	
	scanf("%d %d", &a, &b);
	
	if(b = 1){
		//タップ不要
		tapcount = 0;
	}else if(b <= a){
		//タップ1つでよし
		tapcount = 1;
	}else{
		for(int i = 0; i < 21; i++){
			if( b <= ((a - 1) * tapcount - 1) + a;){
				break;
			}else{
				tapcount++;
			}
		}
	}
	
	printf("%d" , tapcount);
  
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:62: error: expected ')' before ';' token
   17 |                         if( b <= ((a - 1) * tapcount - 1) + a;){
      |                           ~                                  ^
      |                                                              )
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define sz(x) (int)(x).size()
#define v(T) vector<T>
#define vv(T) v(v(T))
#define in(e,l) (std::find(l.begin(), l.end(), e) != l.end())
#define asort(l) (std::sort(l.begin(), l.end()))
#define dsort(l) (std::sort(l.rbegin(), l.rend()))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;

int main() {
  ll A, B;
  cin >> A >> B;
  ll ans = 1;
  ll cnt = A;
  while(cnt < B) {
    cnt += (A - 1);
    ++ans;
  }
  if(B == 1){
    cout << "0" << endl;
  else {
    cout << ans << endl;
  }
  return 0;
}



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

#include<iostream>
using namespace std;
int main(void)
{
  int a,b;
  int i=0;
  cin >> a >> b;
  int sum = 1;
  
  while(1)
  {
  	sum = 1;
      if(sum >= b)
        break;
    i++
    sum--;
    sum+=a;
    
  }
  
  cout << i;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:8: error: expected ';' before 'sum'
   15 |     i++
      |        ^
      |        ;
   16 |     sum--;
      |     ~~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  int a,b;
  int i=0;
  cin >> a >> b;
  int sum = 1;
  
  while(1)
  {
  	sum = 1
      if(sum >= b)
        break;
    i++
    sum --;
    sum+=a;
    
  }
  
  cout << i;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before 'if'
   12 |         sum = 1
      |                ^
      |                ;
   13 |       if(sum >= b)
      |       ~~        
a.cc:15:8: error: expected ';' before 'sum'
   15 |     i++
      |        ^
      |        ;
   16 |     sum --;
      |     ~~~
Language: C++

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

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

  int i = 0;
  int c;
  
  while(true){
    i++;
    if(i == 1){
      c = a;
    }else{
      c = a * i - (i - 1);
    }
    if(c >= b){
      flg = false;
      cout << i << endl;
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:7: error: 'flg' was not declared in this scope
   20 |       flg = false;
      |       ^~~
Language: C++

#include<iostream>
#include<iomanip>
#include<string>
#include<queue>
#include<vector>
#include<algorithm>
#include<tuple>
#include<numeric>
#include<map>
#include<cmath>
#define ll long long
#define mod 1000000000+7
#define rep(i,n) for(int i=0;i<(int) (n);i++)
ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
using namespace std;
int main(){
int a,b,i=0,f=0,anser;
cin>>a>>b;

while(f<1){
  if(1+(a*i)<=b)i++;
  anser=i;
  else f=1;
}

cout<<anser;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'else' without a previous 'if'
   24 |   else f=1;
      |   ^~~~
Language: C

#include<stdio.h>
int main()
{int a,b,c=0,sum=0;
 scanf("%d %d",&a,&b);
 else if(a<b)
 {while(sum<=b)
 {c++;
  sum+=(a-1);
 if((sum+1)==b)
 printf("%d",c);}
  printf("%d",c);
 }
 else if(a>=b)
   c=1;
 printf("%d",c);

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:2: error: 'else' without a previous 'if'
    5 |  else if(a<b)
      |  ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int inf=1e9,mod=1e9+7;
typedef long long ll;
int read() {
	int x=0,f=1;
	char c=getchar();
	while(c<'0'||c>'9') f=(c=='-')?-1:1,c=getchar();
	while(c>='0'&&c<='9') x=x*10+c-'0',c=getchar();
	return x*f;
}
int a[1000001];
main() {
	int n=read(),maxx=0,js=0;
	if(B==1) puts("0"),exit(0);
	for(int i=1; i<=n; i++)
		a[i]=read();
	for(int i=1; i<=n; i++) {
		if(a[i]<=a[i-1])
			js++;
		else js=0;
		maxx=max(maxx,js);
	}
	cout<<maxx;
}

Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:15:12: error: 'B' was not declared in this scope
   15 |         if(B==1) puts("0"),exit(0);
      |            ^
Language: C++

#include <cstdio>
#include <iostream>
#include <vector>

int main()
{
  int N;
  std::vector<int> H;

  std::cin >> N;
  for (int tmp,i = 0; i < N; i++)
  {
    std::cin
  }

  return 0;
}

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

#include <stdio.h>

int main(){
	int A,B;
	scanf("%d %d",&A.&B);
	printf("%d",((B-1)/(A-1)));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:26: error: expected identifier before '&' token
    5 |         scanf("%d %d",&A.&B);
      |                          ^
Language: C++

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


int main(){

  fastio;
int a;cin>>a;
int b;cin>>b;

if(b!=1){
    int t=a;
    int sol=1;
    while(a<b){
        sol++;
        a=t-1+a;
    }
    cout<<sol<<endl;

}
else{
    cout<<0<<endl;
}
return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'fastio' was not declared in this scope
    7 |   fastio;
      |   ^~~~~~
Language: Java

public class Main {

	/*
	 * 文字列を分割して回数を数える
	 */
	public static void main(String[] args) {

		/*
		 * Scannerで値取得。
		 */
		Scanner s = new Scanner(System.in);
		int a = s.nextInt();
		int b = s.nextInt();
		s.close();

		/*
		 * とりあえずa個あって1つあたりa-1個ずつ増えると考えてみる。
		 */

		int count = 0;
		int sum = 0;
		//count タップの個数、sum:差込口の数
		do {
			count++;
			sum += (a - 1);
		} while (sum >= b);

		System.out.println(count);

	}

}


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected '}' before 'else'
    8 |     else
      |     ^~~~
a.cc:6:11: note: to match this '{'
    6 |   if(b==1){
      |           ^
Language: C++

#include<bits/stdc++.h>
//#include<ext/pb_ds/tree_policy.hpp>
#define ll long long
#define int long long int
#define mkp make_pair
#define maxN 1005
#define pb push_back
#define ff first
#define ss second
#define debug1(a) cout<<a<<endl;
#define debug2(a,b) cout<<a<<' '<<b<<endl;
#define debug3(a,b,c) cout<<a<' '<<b<<' '<<c<<endl;
#define rep(i,n) for(int i=0;i<n;i++)
#define repl(i,a,b) for(int i=a;i<b;i++)
#define pi pair<int,int>
#define pii pair<int,pi>
#define mp map<int,int>
#define ump unordered_map<int,int>
#define  vi vector<int>
#define st set<int>
#define mst multiset<int>
#define pq priority_queue
#define mpq priority_queue<int,vector<int>,greater<int> >
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define in cin>>
#define out cout<<
//using namespace __gnu_pbds;
using namespace std;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> orderedSet;
//typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update> orderedMSet;
//*p.find_by_order(index) return value at index
//p.order_of_key(key) return index
void printArray(int arr[],int n)
{
   for(int i=0;i<n;i++)cout<<arr[i]<<' ';
}
void printMp(mp m)
{
  mp ::iterator it;
  for(it=m.begin();it!=m.end();it++)cout<<it->first<<' '<<it->second<<endl;
}
void printUmp(ump m)
{
  ump ::iterator it;
  for(it=m.begin();it!=m.end();it++)cout<<it->first<<' '<<it->second<<endl;
}
void printSt(st s)
{
  st ::iterator it;
  for(it=s.begin();it!=s.end();it++)cout<<*it<<' ';
}
void printMst(mst s)
{
  mst ::iterator it;
  for(it=s.begin();it!=s.end();it++)cout<<*it<<' ';
}
void printVec(vector<int>v)
{
for(int i=0;i<v.size();i++)cout<<v[i]<<' ';
}
void printVec2(vector<int>v[],int n)
{
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<v[i].size();j++)
            cout<<v[i][j]<<' ';
        cout<<endl;
    }
}
 set<pair<int,int>> primeset;
void SieveOfEratosthenes(int n)
{
    bool prime[n+1];
    memset(prime, true, sizeof(prime));

    for (int p=2; p*p<=n; p++)
    {
        if (prime[p] == true)
        {
        for (int i=p*p; i<=n; i += p)
                prime[i] = false;
        }
    }
    for (int p=2; p<=n; p++)
       if (prime[p])
          primeset.insert(mkp(p,1));
}
pi g1[1000006],g2[1000006];
int arr[maxN][maxN];

int32_t main(){
    fastio;
int a;in a;int b;in b;
SieveOfEratosthenes(11);
if(b==1)
    out 0<<endl;
else{
    int temp=a;
    SieveOfEratosthenes(11);
    int ans=1;
    SieveOfEratosthenes(11));
    while(a<b){
        ans++;SieveOfEratosthenes(11));
        a=temp-1+a;
    }SieveOfEratosthenes(11);
    out ans;
}
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:101:28: error: expected ';' before ')' token
  101 |     SieveOfEratosthenes(11));
      |                            ^
      |                            ;
a.cc:103:38: error: expected ';' before ')' token
  103 |         ans++;SieveOfEratosthenes(11));
      |                                      ^
      |                                      ;
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
const int MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main(){
  int a, b;
  cin >> a >> b;
  if (b == 1)	cout << 0:
  else if (a >= b)	cout << 1;
  else
  {
	for (int i = 2; i < 100; i++)
	{
		int x = (a - 1) * i + 1;
		if (x >= b)
		{
			cout << i;
			break;
		}
	}
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: expected ';' before ':' token
   11 |   if (b == 1)   cout << 0:
      |                          ^
      |                          ;
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: lvalue required as left operand of assignment
   11 |       if (A * i = (i - 1) >= B){
      |           ~~^~~
Language: C++

#include <iostream>
#include <string>
#include <iomanip>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
	int a, b;
	cin >> a >> b;
	int count = 1;
	int misi = a;

	if(b == 1){
		cout << 0 << endl;
		return;
	}

	while(misi < b){
		misi += a;
		misi -= 1;
		count++;
	}


	cout << count << endl;

	return 0;
}

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 <stdio.h>
 
int main(void){
  int i=0;
  int j=0;
  scanf("%d %d",&i,&j);
  int num=0;
  if(j>=i){
    for(;j>=i;j-=(i-1))
      num++;
    num++;
    printf("%d",num;);
  }
  else{
    if(j<=1)
      printf("0");
    else
      printf("1");
  }  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:20: error: expected ')' before ';' token
   12 |     printf("%d",num;);
      |           ~        ^
      |                    )
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int A;
  int B;
  
  cin >> A;
  cin >> B;
  if((B-1)%(A-1)=0){
    cout << (B-1)/(A-1) << endl;
  }
  else{
    cout << (B-1)/(A-1)+ << endl;
  }  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: lvalue required as left operand of assignment
   11 |   if((B-1)%(A-1)=0){
      |      ~~~~~^~~~~~
a.cc:15:26: error: expected primary-expression before '<<' token
   15 |     cout << (B-1)/(A-1)+ << endl;
      |                          ^~
Language: C++

#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>

using namespace std;

int sockets(int holes, int plug){
    return (holes * plug) - (plug-1);
}


int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int a, b; // a = socket, b = required number.
	cin >> a >> b;

	int ans;
	if (a > b) ans = b;
	else ans = b / a;

	while (sockets(a, ans) < b) {
		ans++;
	}


	cout << ans;
	return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:40:18: error: expected '}' at end of input
   40 |         return 0;
      |                  ^
a.cc:24:12: note: to match this '{'
   24 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <vector>
int main(int argc, char *argv[])
{
  int a, b;
  std::cin >> a >> b;
  double c = 1;
  if (b == 1)
  {
    std::cout << 0 << std::endl;
    return;
  }
  for (int i = 0; i < 1000; i++)
  {
    if (c + a - 1 >= b)
    {
      std::cout << i + 1 << std::endl;
      break;
    }
    else
    {
      c += (a - 1);
    }
  }
  return 0;
}


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

#include <cstdio>

int cnt = 0;
int current = 0;

void sum(int size, int goal) {
  cnt++;
  current += size;
  if (current < goal) {
    sum(size - 1, goal);
  }
}

int main() {
  int size, goal;
  scanf("%d %d", &size, &goal);
  sum();
  printf("%d\n", cnt);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: too few arguments to function 'void sum(int, int)'
   17 |   sum();
      |   ~~~^~
a.cc:6:6: note: declared here
    6 | void sum(int size, int goal) {
      |      ^~~
Language: C++

#include <bits/stdc++.h>
#define int int64_t
#define rp(i, N) for(int i=0; i<N; i++);
using namespace std;
using pair = pair<int, int>;
using tup  = tuple<int, int, int>;
using vec  = vector<int>;
using vvec = vector<vec>;
const int INF = 100000000;
// " ", ' '

// プロトタイプ宣言
// int myfunc(int, vvec);

// グローバル変数
// int N, M;
// vvec data(N, vec(M));

// 関数：

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int A, B;
	cin >> A >> B;

	int ct = 0;
	if(A==B || A>B) ct = 1;
	else if {
		while(B>A) {
			B = B-A+1;
			ct += 1;
	}

	cout << ct << endl;
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:17: error: expected '(' before '{' token
   29 |         else if {
      |                 ^
      |                 (
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:21:15: note: to match this '{'
   21 | signed main() {
      |               ^
Language: C++

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

int main() {
    long long a,b;long long i=1;
    cin>>a>>b;
    while(i<=a)
    {
    	if((i*a-i+1=b)
    	break;
    	i++;
    }
    cout<<i;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: lvalue required as left operand of assignment
   10 |         if((i*a-i+1=b)
      |             ~~~~~^~
a.cc:12:12: error: expected ')' before ';' token
   12 |         i++;
      |            ^
      |            )
a.cc:10:11: note: to match this '('
   10 |         if((i*a-i+1=b)
      |           ^
Language: C++

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

int main(){
    int a,b;
    cin>>a>>b;
  if(a>=b) cout<<1;
  int k=a,ans=1;
   else{
     while(true){
       k+=(a-1);
       ans++;
       if(k>=b){
         
         cout<<ans;
         return 0;
       }
     }
   }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: 'else' without a previous 'if'
   13 |    else{
      |    ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(int argc, const char * argv[]) {
    int A, B;
    cin >> A;
    cin >> B;
    if (B == 1) {
        cout << "0 << endl;
        return 0;
    }
    
    int kuchi = A;
    int count = 1;
    while (kuchi < B) {
        kuchi -= 1;
        kuchi += A;
        count++;
    }
    
    cout << count << endl;
    
    return 0;
}


Compiler output:
a.cc:9:17: warning: missing terminating " character
    9 |         cout << "0 << endl;
      |                 ^
a.cc:9:17: error: missing terminating " character
    9 |         cout << "0 << endl;
      |                 ^~~~~~~~~~~
a.cc: In function 'int main(int, const char**)':
a.cc:10:9: error: expected primary-expression before 'return'
   10 |         return 0;
      |         ^~~~~~
Language: C++

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

int main(){
    int a,b;
    cin>>a>>b;
  if(a>=b) cout<<1;
  int k=a,ans=1;
   else{
     while(true){
       k+=(a-1);
       ans++;
       if(k>=b){
         
         cout<<ans;
         return 0;
       }
     }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: 'else' without a previous 'if'
   13 |    else{
      |    ^~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define inf 1e+9
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

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

    int n,k,ans=1,c=0;
	string s;
	cin >> n >> k;

	// if(k==1){
	// 	cout << "0" << endl;
	// 	return 0;
	// }

	// for(int i=1;i<20;i++){
	// 	ans = n*i;
	// 	if(ans>=k){
	// 		c=i;
	// 		break;
	// 	}
	// }

	while(ans<k){
		ans+=n;
		ans:=1;
		c++;
	}

	cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:21: error: expected primary-expression before '=' token
   61 |                 ans:=1;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int s,t;
    cin >> s >> t;
    int ans = (b+a-3)/(a-1);
    cout << ans << endl;
    //cin >> s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: 'b' was not declared in this scope
    7 |     int ans = (b+a-3)/(a-1);
      |                ^
a.cc:7:18: error: 'a' was not declared in this scope
    7 |     int ans = (b+a-3)/(a-1);
      |                  ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: lvalue required as left operand of assignment
    9 |   ans*(a-1)=b;
      |   ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    int a,b;
    cin >> a >> b;
    int ans = (b+a-3)/(a-1)
    cout << ans << endl;
    //cin >> s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'cout'
    8 |     cout << ans << endl;
      |     ^~~~
Language: C

#include<stdio.h>

void main()
{
  
int a,b,n,sum;
  n=0;
scanf('%d',&);
scanf('%d',&b);
sum=b;
if(a>b)
  n=1;
else if (a==b)
  n=1;
else
{ while(a<sum)
{sum-=(a-1);
 n+=1;
}
 n++;
}
  printf("%d",n);
}

Compiler output:
main.c: In function 'main':
main.c:8:7: warning: multi-character character constant [-Wmultichar]
    8 | scanf('%d',&);
      |       ^~~~
main.c:8:13: error: expected expression before ')' token
    8 | scanf('%d',&);
      |             ^
main.c:8:7: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    8 | scanf('%d',&);
      |       ^~~~
      |       |
      |       int
In file included from main.c:1:
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:9:7: warning: multi-character character constant [-Wmultichar]
    9 | scanf('%d',&b);
      |       ^~~~
main.c:9:7: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    9 | scanf('%d',&b);
      |       ^~~~
      |       |
      |       int
/usr/include/stdio.h:428:42: note: expected 'const char *' but argument is of type 'int'
  428 | extern int scanf (const char *__restrict __format, ...) __wur;
      |                   ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include<iostream>

int main(void)
{
	int a,b,c;
	cin >> a >> c;
	for(b=1;b<=10000;b++)
		if(a*b>=c)
			break;
	cout << b;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> a >> c;
      |         ^~~
      |         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:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         cout << b;
      |         ^~~~
      |         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 <string>

using namespace std;

//PwoerSoket
int main(){
	int a=0,b=0,ans=0;

	cin>>a;
	cin>>b;

	for(int i=1;i<21;i++){
	
		if((a*i)-(i-1)>=b) {
			ans=i;
			break;
		}

	}
	

	cout<<ans;


	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |         cin>>a;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | 
a.cc:22:9: error: 'cout' was not declared in this scope
   22 |         cout<<ans;
      |         ^~~~
a.cc:22:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<stdio.h>
int main()
{
    int a, b;
	int tapcount = 0; //タップ数
	
	scanf("%d %d", &a, &b);
	
	for(int i = 0; b =< a * tapcount; i++){
		tapcount++;
	}
	
	printf("%d" , tapcount);
  
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:27: error: expected expression before '<' token
    9 |         for(int i = 0; b =< a * tapcount; i++){
      |                           ^
Language: C

#include<iostream.h>

void main()
{
  
int a,b,n,sum;
  n=0;
scanf('%d',&);
scanf('%d',&b);
sum=b;
if(a>b)
  n=1;
else if (a==b)
  n=1;
else
{ while(a<sum)
{sum-=(a-1);
 n+=1;
}
 n++;
}
  printf("%d",n);
}

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

#include <iostream>
using namespace std;
 
int main()
{
  int A;
  int B;
  
  cin >> A;
  cin >> B;
  cout << (B-1)/(A-1) << end1;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: 'end1' was not declared in this scope
   11 |   cout << (B-1)/(A-1) << end1;
      |                          ^~~~
Language: C++


#include "iostream"
#include "string"
#include "vector"

using namespace std;

#define ll long long int
#define str string

ll MOD = 1000000007, INFL = 1ll << 60, INF = 1 << 30, mod = 1e9 + 7, Max = INF, Min = -1;
ll a = 0, b = 0, c = 0, n = 0, sum = 0;
ll A[500000] = {}, B[500000] = {}, ruiseki[500000] = {}, dp[100][10] = {};
int dy[] = { 0, 0, 1, -1 }, dx[] = { 1, -1, 0, 0 };
vector <ll> v;
str S, T;
bool check = false, check2 = false;

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;
}

int main() {
	sum = 1;
	//Code Line
	cin >> a >> b;
	
	else while (1) {
		if (sum >= b)break;
		sum--;
		sum += a;
		n++;
	}
	cout << n << endl;

	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:39:9: error: 'else' without a previous 'if'
   39 |         else while (1) {
      |         ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(void)
{
  int a,b;
  int j;
  cin >> a >> b;
  int sum = 0;
 	for(int i = 1;;i++)
    {
      sum += a - 1;
     	if(sum + 1 >= b)
          break;
    }
  
  cout << i;
}

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

#include <iostream>

using namespace std;

int main(){
  int A, B;
  
  cin >> A >> B;
  
  if{
    for (int i = 1; i < 200; i++){
      if (A * i >= B){
        cout << i << endl;
        break;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected '(' before '{' token
   10 |   if{
      |     ^
      |     (
Language: C++

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

int main()
{
  string S, T;
  int A, B;
  cin >> A >> B;
  if (A=>B) cout << 1 << endl;
  else cout << B/A + 1 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected primary-expression before '>' token
    9 |   if (A=>B) cout << 1 << endl;
      |         ^
Language: Java

import java.util.*;
public class B {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		int num = 1;
		int ans = 0;
		
		while (true) {
			if(b == 1) break;
			ans++;
			num = num - 1 + a;
			if (num >= b) break; 
		}
		
		System.out.println(ans);
	}

}


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

#include <stdio.h>
 
int main(void){
  int i=0;
  int j=0;
  scanf("%d %d",&i,&j);
  if(j<=1){
    printf("0");
    return 0;
  }
  printf("%d",(j-i)/(i-1)+1);
  return 0;


Compiler output:
main.c: In function 'main':
main.c:12:3: error: expected declaration or statement at end of input
   12 |   return 0;
      |   ^~~~~~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:32: error: expected ';' before ')' token
   13 |     for (int i = 2; i < 20, i++){
      |                                ^
      |                                ;
Language: C

#include <stdio.h>
 
int main(void){
  int i=0;
  int j=0;
  scanf("%d %d",&i,&j);
  if(J<=1){
    printf("0");
    return 0;
  }
  printf("%d",(j-i)/(i-1)+1);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:6: error: 'J' undeclared (first use in this function)
    7 |   if(J<=1){
      |      ^
main.c:7:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
int main(){
  int n,c=0,k;
  cin>>n>>k;
  if(k==0){cout<<0;return 0;
  for(int i=0;i<10000;i++){
    if(i==0)c+=n;
    else c+=n-1;
    if(c>=k){cout<<i+1;return 0;}
  }
}


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

import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double a = sc.nextDouble();
		double b = sc.nextDOuble();
        double count = 0;
        int countInt = 0;
        count = (b-1) / (a-1);
        while(count > 0){
        	countInt++;
            count =  count - 1.0;
        }
      System.out.println(countInt);
	}
 
}

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

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before ')' token
   12 |     for (int i = 2; i < 20, i++){
      |                                ^
      |                                ;
Language: Java

import java.util.Scanner;

public class problemB {

  /**
   * @param args
   */
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();

    for (int i = 0; i <= 20; i++) {
      if (i == 1) {
        if (a >= b) {
          System.out.println(i);
          return;
        }
      }

      if (((a * i) - (i - 1)) >= b) {
        System.out.println(i);
        return;
      }
    }
  }

}


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

#include <iostream>
using namespace std;

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

	for(int i=0; a*i<b; i++){}
	cout << i;
}

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

#include<iostream>
using namespace std;

int main(){
 int A,B;
 int i = 1;
 cin >> A >> B;
 while(True){
 	if(A * i >= B){
 		break;
 	}
 	i++;
 }
 cout << i;
 return 0;
}

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

a,b = map(int,input().split())
if (b - 1) // (a-1) == (b - 1) / (a-1):
    ans = (b - 1) // (a-1)
else:
    ans = (b - 1) // (a-1) + 1
print(ans)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b = map(int,input().split())
      | ^