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

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


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

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

Compiler output:
main.c: In function 'main':
main.c:8:5: error: 'X' undeclared (first use in this function)
    8 |     X+=a-1;
      |     ^
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef pair<int,int> ii;
#define inf 1e9
#define F first
#define S second
#define dbg(x) cout<<#x<<" value : "<<x<<"\n";
#define rep(i,j,k) for(int i = (j); i <= (k); i++)
#define rep__(i,j,k) for(int i = (j); i < (k); i++)
#define per(i,j,k) for(int i = (j); i >= (k); i--)
#define per__(i,j,k) for(int i = (j); i > (k); i--)
#define mst(a,b) memset(a,b,sizeof(a))
#define sf(n) scanf("%d",&n)
#define stf(n,m) scanf("%d%d",&n,&m)
#define pf(n) printf("%d\n",n)
#define slf(n) scanf("%lld",&n)
#define plf(n) printf("%lld\n",n)
priority_queue<int,vector<int>,less<int> > q;
const int N=3e6+10;
const int mod=1e9+7;
int n,m;
int main()
{
	stf(n,m);
	if(m%n==)cout<<m/n;
	else cout<<m/n+1<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:17: error: expected primary-expression before ')' token
   27 |         if(m%n==)cout<<m/n;
      |                 ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

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

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

int main()
{
  int a,b;
  cin>>a>>b;
  for(int i=1;;i++)
  {
    int x+=a;
    if(x>=b)
    {	cout<<i<<endl;
     break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected initializer before '+=' token
   10 |     int x+=a;
      |          ^~
a.cc:11:8: error: 'x' was not declared in this scope
   11 |     if(x>=b)
      |        ^
Language: C++

#include<iostream>
int main(void) {
 
	int a = 0;
	int b = 0;
	int i = 0;
	int k = 1;
	scanf_s("%d %d", &a, &b);
 
	i = a;
 
	while(b > i) {
 
		i = i - 1;
		i = i + a;
		k = k + 1;
	}
 
	printf("%d", k);
 
	return 0;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d %d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<iostream>
int main(void) {

	int a = 0;
	int b = 0;
	int i = 0;
	int k = 1;
	scanf_s("%d %d", &a, &b);

	i = a;

	while(b > i) {

		i = i - 1;
		i = i + a;
		k = k + 1;
	}

	printf("%d", k);

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    8 |         scanf_s("%d %d", &a, &b);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>

int main(void){
	  int A;
	  int B;
	  scanf("%d%d", &A, &B);
	  int count = 1;
	  int total = 0;
	  while(1){
		if(A == B)break;
	        total += 2 * A - 1;
        　　count++;
	        if(total >= B){
			count++;
			break;
		}
		
	  }
	  printf("%d\n",count);
	  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:9: error: stray '\343' in program
   12 |         <U+3000><U+3000>count++;
      |         ^~~~~~~~
main.c:12:11: error: stray '\343' in program
   12 |         <U+3000><U+3000>count++;
      |                 ^~~~~~~~
Language: C++

#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;
int a, b, i, j, k, a, n, m;
int main() {
	scanf("%d%d", &a, &b);
	i = a; j = 1;
	while (i < b) {
		i += (a - 1);
		j++;
	}
	printf("%d\n", j);
}

Compiler output:
a.cc:7:20: error: redefinition of 'int a'
    7 | int a, b, i, j, k, a, n, m;
      |                    ^
a.cc:7:5: note: 'int a' previously declared here
    7 | int a, b, i, j, k, a, n, m;
      |     ^
Language: C++

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

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

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

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

#inlcude<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  cout<<ceil(b/a)<<endl;
  return 0;
}

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

#include<iostream>
#define ll long long
using namespace std;
int main() {
 ll A, B; 
 ll tapnum = 0
 ll ans = 1;
 cin >> A >> B;
 if (B==1) cout << 0 << endl;
 else {
   tapnum += A;
   while (tapnum < B) {
     tapnum += A - 1;
     ans++;
   }
   cout << ans << endl;
 }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:12: error: expected ',' or ';' before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:7:2: note: in expansion of macro 'll'
    7 |  ll ans = 1;
      |  ^~
a.cc:14:6: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |      ans++;
      |      ^~~
      |      abs
a.cc:16:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |    cout << ans << endl;
      |            ^~~
      |            abs
Language: Java

import java.util.Scanner;
import java.Math;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int B = sc.nextInt();
    System.out.print(B / (A - 1));
  }
}

Compiler output:
Main.java:2: error: cannot find symbol
import java.Math;
           ^
  symbol:   class Math
  location: package java
1 error
Language: C++

#include<iostream>
#include<iomanip>
#include<cmath>

using namespace std;

int main(){
  std::cin.tie(nullptr);                  // 標準入出力高速化
  std::ios_base::sync_with_stdio(false);  // SとS++の入出力出力を非同期
  double a,b;
  cin>>a>>b;
  c=a-1;
  while(a<b){
    a+=c;
  }
  cout<<ceil(b/a)<<endl;
}

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

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
int main() {

int a,b,c;
 
  cin >> a >>b;
 
   
  for(int i =0;i<30;i<++){
   
    c = (1+i)*a-i;
    
    if(c>=b){
      cout <<  i << endl;
      
      return 0;
    }
  }
    
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:25: error: expected primary-expression before ')' token
   11 |   for(int i =0;i<30;i<++){
      |                         ^
Language: Java

mport java.util.*;
public class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x = sc.nextDouble();
		double y = sc.nextDouble();	
		System.out.println(y==1?0:(int)Math.ceil(y/x));

	}

}


Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.*;
^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int lint;

int main(){
    int n, k;
    cin >> n >> k;
    if(n==k || n>k){
        cout << "1";
    }else{
        int cntr = 1;
        int sonuc = 0;
        while(cntr<k){
            cntr = cntr+n-1;
            sonuc++;
        }
    }
    cout << sonuc;
    return 0;
}

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

#include <stdio.h>

int main(void)
{
    int a, b;
    int sum = 0;
    int puragu = 1;

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

    int a1 = a-1;

    while(1){
        puragu += a1;
        ++sum+;
        if(puragu >= b){
            printf("%d\n", sum);
            break;
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:15: error: expected expression before ';' token
   15 |         ++sum+;
      |               ^
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:17: error: expected expression before '>' token
    8 |     if ( i * a => b ) { break; }
      |                 ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef long long ll;

const int mod = 1e9 + 7;
const ll inf = 3e18 + 5;

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

    freopen("input.txt", 
    int a,b;
    cin >> a >> b;
    int cnt = a, sol = 1;
    if(b==1)
        cout << 0;
    else{
        while(cnt<b){
            cnt+=(a-1);
            sol++;
        }
        cout << sol;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: expected primary-expression before 'int'
   18 |     int a,b;
      |     ^~~
a.cc:18:11: error: 'b' was not declared in this scope
   18 |     int a,b;
      |           ^
a.cc:19:12: error: 'a' was not declared in this scope
   19 |     cin >> a >> b;
      |            ^
Language: C++

#include <bits/stdc++.h>

int main(){
  int A, B;
  cin >> A >> B;
  cout << B/A;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> 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:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << B/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>

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

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

#include <iostream>

int main() {
  int a, b;
  std::cin >> a >> b;
  --a; --b;
  std::cout << (B + A) - 1;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'B' was not declared in this scope
    7 |   std::cout << (B + A) - 1;
      |                 ^
a.cc:7:21: error: 'A' was not declared in this scope
    7 |   std::cout << (B + A) - 1;
      |                     ^
Language: C

#include <stdio.h>

int main(void) {
	int A,B;
	int count=1,ans;
	scanf("%d %d",&A,&B);
	if(A==B){
		printf("1\n");
	}else{
  	ans=A;
  	while(ans=<B){
  	if(ans=<B){
  		ans+=A-1;
  		count++;
  	}
	}
		printf("%d",count);
	}
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:19: error: expected expression before '<' token
   11 |         while(ans=<B){
      |                   ^
main.c:12:16: error: expected expression before '<' token
   12 |         if(ans=<B){
      |                ^
Language: C++

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

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

#include<iostream.h>
using namespace std;
{
	int a,b,c,d=1;
	cin>>a>>b;
	c=a;
	while(1){
		if(b=1){ d=0; break; }
		if(b<=c) break;
		c+=a-1;
		d++;
	}
	cout<<d<<endl;
}

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

#include<iostream.h>
using namespace std;
{
	int a,b,c,d=1;
	cin>>a>>b;
	c=a;
	while(1){
		if(b=1){ d=0 break }
		if(b<=c) break;
		c+=a-1;
		d++;
	}
	cout<<d<<endl;
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  cin >> A >> B;
  int ans=0,cnt;
  while(ans<B){
    ans++:
  }
  cout << ans << endl;
}

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:43: error: expected ')' before '{' token
    7 |   if (b % (a - 1) == 0 || b % (a - 1) == 1 {
      |      ~                                    ^~
      |                                           )
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ')' before ';' token
    8 |         ans=ceil(1.0*(b-1)/(a-1);
      |                 ~               ^
      |                                 )
Language: C++

#include<bits/stdc++.h>
using namespace std;
int sum;
int main()
{
	int a,b;
	cin>>a>>b;
	if(a>=b)
	{
		sum++;
	}
	else
	{
		sum=b/a+1;
	}
	cout<<sum<<endl;6 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ';' before 'return'
   16 |         cout<<sum<<endl;6
      |                          ^
      |                          ;
   17 |         return 0;
      |         ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,as;
  cin>>a>>b;
 if(b%a==0)
 {
    as=b/a;
   cout<<as;
 }
  else
  {
    int ma=b/a;+1
  cout<<ma;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected ';' before 'cout'
   14 |     int ma=b/a;+1
      |                  ^
      |                  ;
   15 |   cout<<ma;
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
 if(b%a==0)
 {
   int as=b%a;
   cout<<as;
 }
  else
  {
    int ma=as+1;
  cout<<ma;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: 'as' was not declared in this scope; did you mean 'a'?
   14 |     int ma=as+1;
      |            ^~
      |            a
Language: Java

import java.util.Scanner;

public class ABC139_B{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();

    // b=1の場合(aプラグ必要なし)
    if(b==1) {
      System.out.println(0);
      System.exit(0);
    }
    // a>bの場合(aプラグが1つ必要)
    if(a>b) {
      System.out.println(1);
      System.exit(0);
    }

    // b>=2の場合(aプラグがn個必要)
    int ans = 1; // 最後のプラグ分を事前に加算
    b += -a;      // 最後のプラグは、穴がa個空いている
    --a;          // 最後のプラグ以外は、穴がa-1空いている
    if(b%a == 0)
      ans += b/a;
    else
      ans += b/a+1;

    System.out.println(ans);
  }
}

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

import java.util.Scanner;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str  = sc.nextLine();
        String[] astr = str.split(" "); //状況に合わせて
        int kuti = 0;
        int flag = 0;
        int[] in_data = Stream.of(astr).mapToInt(x->{
            try{
                return Integer.parseInt(x);
            }
            catch(Exception e){
                e.printStackTrace();
            }
            return 0;
        }).toArray();
        sc.close();
        int a = in_data[0];
        int b = in_data[1];

        kuti = a;
        flag +=1;
        if(b <= kuti){
            System.out.println("1");
            System.exit(0);
        }

        for(int i=1;i<b;i++){
            kuti = kuti + a ;
            flag += 1;
            if(b <= kuti){
                System.out.println(flag);
                System.exit(0);
            }
            kuti -=1;
        }
    }

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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <climits>
#include <bitset>
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<pair<int,int>> vpii;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
#define rep(i,n) for(int i=0;i<n;i++)
#define fin(ans) cout<<(ans)<<endl
#define P 1000000007
#define STI(s) atoi(s.c_str())//string to int
#define mp(p,q) make_pair(p,q)
#define Sort(a) sort(a.begin(),a.end())
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
const int INF = INT_MAX;
const long long LLINF = 1LL<<60;
//g++ -std=c++1z temp.cpp
//./a.exe


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

int a,b,ans = 1;

cin >> a >> b;

int sum = a;
if (a < b && b != 0)
{

rep(i,100){

    sum += a-1;

    ans++;

    if (sum >= b)
    {
           break;
    }
    
}

cout << ans << endl;

}elseif(a >= b && b != 0)
{
    cout << '1' << endl;
}else
{
    cout << '0' << endl;
}


//////////////////////////////////////////////////////
return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:66:2: error: 'elseif' was not declared in this scope
   66 | }elseif(a >= b && b != 0)
      |  ^~~~~~
a.cc:69:2: error: 'else' without a previous 'if'
   69 | }else
      |  ^~~~
Language: C++

using namespace std;
 
int main() {
  int a,b;
  int ans;
  cin >> a >> b;

  int s = a - 1;
  int t = b - 1;
  
  ans = (t + s - 1)/s;

  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   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 | using namespace std;
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 | using namespace std;
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected ';' before '}' token
   13 |   cnt += 1
      |           ^
      |           ;
   14 |   }
      |   ~
Language: C++

#include <iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected ';' before '}' token
   14 |   cnt += 1
      |           ^
      |           ;
   15 |   }
      |   ~        
a.cc: At global scope:
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << cnt << endl;
      |   ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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


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

#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <ios> 
#include <iomanip>
using namespace std;

#define N_MAX   (100000)
#define LL_MAX_NUM (1LL<<60)
#define INF 1e7

typedef long long ll;
typedef long long int lli;

int main() {
    int A, B, res, tap; cin >> A >> B;
    res = 1;
    tap = 0;
    while(true)
    {
        if (res >= B)
        {
            berak;
        }
        res--;
        res += A;
        tap++;
    }
    cout << tap << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: 'berak' was not declared in this scope
   32 |             berak;
      |             ^~~~~
Language: C++

#include<bits/stdc++.h>
int main() {
    ll a, b;
    cin >> a >> b;
    if(b==1) {
        cout << 0 << endl;
        return 0;
    }
    cout << (b-1+a-2)/(a-1) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'll' was not declared in this scope
    3 |     ll a, b;
      |     ^~
a.cc:4:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |     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:4:12: error: 'a' was not declared in this scope
    4 |     cin >> a >> b;
      |            ^
a.cc:4:17: error: 'b' was not declared in this scope
    4 |     cin >> a >> b;
      |                 ^
a.cc:6:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         cout << 0 << 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:6:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |         cout << 0 << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << (b-1+a-2)/(a-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:9:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |     cout << (b-1+a-2)/(a-1) << endl;
      |                                ^~~~
      |                                std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:8: error: expected ')' before ';' token
   12 |     a=1;
      |        ^
      |        )
main.c:11:7: note: to match this '('
   11 |   else(
      |       ^
main.c:12:9: error: expected ';' before '}' token
   12 |     a=1;
      |         ^
      |         ;
   13 |     }
      |     ~    
main.c: At top level:
main.c:14:9: error: expected declaration specifiers or '...' before string constant
   14 |  printf("%d",a);
      |         ^~~~
main.c:14:14: error: unknown type name 'a'
   14 |  printf("%d",a);
      |              ^
main.c:15:2: error: expected identifier or '(' before 'return'
   15 |  return 0;
      |  ^~~~~~
main.c:16:2: error: expected identifier or '(' before '}' token
   16 |  }
      |  ^
Language: C

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

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

#include <iostream>
#include <stdio.h>
 
using namespace std;
 
int main() {
	int cnt = 1;
	int A, B;
	
	cin>>A
	CIN>>B
	int temp = B;
	while (1) {
		if (A >= B) {
			break;
		}
		else {
			B = B - A;
			cnt++;
		}
		
	}
	
	printf("%d",cnt);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected ';' before 'CIN'
   10 |         cin>>A
      |               ^
      |               ;
   11 |         CIN>>B
      |         ~~~
Language: C++

#include <set>
#include <map>
#include <list>
#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;

int main(){
    int A,B;
    cin >>A >> B;
    int ans = 0,n = 1;
    while (true)
    {
        ans = 1 +(n - 1)(A - 1);
        if(ans >= B)break;
        n++;
    }
    cout << n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:25: error: expression cannot be used as a function
   32 |         ans = 1 +(n - 1)(A - 1);
      |                  ~~~~~~~^~~~~~~
Language: C

#include<stdio.h>
int main(void)
{
	int A,B,i;
	int cnt=0;
	int sum=0;
	scanf("%d%d",&A,&B);
	for(i=1;i<100;i++)
	{
		sum=(A-1)*i+1;
		if(sum==1)
		{
			break;
			else if(sum!=1 && sum>=B)
			cnt++;break;
			else
			cnt++;
		}
	}
	printf("%d",cnt);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:25: error: expected '}' before 'else'
   14 |                         else if(sum!=1 && sum>=B)
      |                         ^~~~
main.c:16:25: error: 'else' without a previous 'if'
   16 |                         else
      |                         ^~~~
main.c: At top level:
main.c:20:16: error: expected declaration specifiers or '...' before string constant
   20 |         printf("%d",cnt);
      |                ^~~~
main.c:20:21: error: unknown type name 'cnt'; did you mean 'int'?
   20 |         printf("%d",cnt);
      |                     ^~~
      |                     int
main.c:21:9: error: expected identifier or '(' before 'return'
   21 |         return 0;
      |         ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
   22 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
	int A,B,i;
	int cnt=0;
	int sum=0;
	scanf("%d%d",&A,&B);
	for(i=1;i<100;i++)
	{
		sum=(A-1)*i+1;
		if(sum==1)
		break;
		else if(sum!=1 && sum>=B)
		cnt++;break;
		else if
		cnt++;
	}
	printf("%d",cnt);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:17: error: 'else' without a previous 'if'
   15 |                 else if
      |                 ^~~~
main.c:16:17: error: expected '(' before 'cnt'
   16 |                 cnt++;
      |                 ^~~
      |                 (
Language: C

#include<stdio.h>
int main(void)
{
	int A,B,i;
	int cnt=0;
	int sum=0;
	scanf("%d%d",&A,&B);
	for(i=1;i<100;i++)
	{
		sum=(A-1)*i+1;
		if(sum==1)
		break;
		else if(sum!=1 && sum>=B)
		cnt++;break;
		else
		cnt++;
	}
	printf("%d",cnt);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:17: error: 'else' without a previous 'if'
   15 |                 else
      |                 ^~~~
Language: C

#include<stdio.h>
int main(void)
{
	int A,B,cnt;
	int sum=0;
	scanf("%d%d",&A,&B);
	do
	{
		sum=(A-1)+1+sum;
		cnt++;
	}while(sum<B);
	printf("%d",cnt);
	return 0;a
	
}


Compiler output:
main.c: In function 'main':
main.c:13:18: error: 'a' undeclared (first use in this function)
   13 |         return 0;a
      |                  ^
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:19: error: expected ';' before '}' token
   13 |         return 0;a
      |                   ^
      |                   ;
   14 | 
   15 | }
      | ~
Language: Java

import java.util.Scanner;
import java.lang.Math;

public class Main2 {

	public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);

		String A = in.next();
		String B = in.next();
		
		in.close();
		
		double ans = (Double.parseDouble(B) - 1)/(Double.parseDouble(A) - 1);
		
		ans = Math.ceil(ans);
		
		int answer = (int)ans;
		
		System.out.println(answer);
	}
	
}

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

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

int main()
{
ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int a,b,c;
  cin>>a>>b;
  c=b/(a-1);
  if((c*a)+1==b) cout<<c;
  else cout<<c+1;
  return 0;
  
}

Compiler output:
a.cc:1:9: fatal error: bits/std.c++.h: No such file or directory
    1 | #include<bits/std.c++.h>
      |         ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <stack>
#define ll long long
using namespace std;

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

	return 0;
}

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

#include <iostream>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <stack>
#define ll long long
using namespace std;

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'ceil' was not declared in this scope
   12 |         cout << ceil(b / a);
      |                 ^~~~
Language: Java

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


Compiler output:
Main.java:13: error: > or ',' expected
      while ( x =< b){
                    ^
1 error
Language: Java

import java.util.Scanner;

public class main{
	public static int main(String[] args) {
		


		Scanner in = new Scanner(System.in);
		int noSocketsPer= in.nextInt();//x
		int proSockets= in.nextInt();//y
		int count=0;
		int counter=0;
		if(noSocketsPer>=proSockets)
			return 1;
		
		while(count<(proSockets-noSocketsPer)) {
			count+=(noSocketsPer-1);
			counter++;
		}
		count+=noSocketsPer;
			return ++counter;
	
}
}

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

import java.util.Scanner;

public class Contact {
	public static int main(String[] args) {
		


		Scanner in = new Scanner(System.in);
		int noSocketsPer= in.nextInt();//x
		int proSockets= in.nextInt();//y
		int count=0;
		int counter=0;
		if(noSocketsPer>=proSockets)
			return 1;
		
		while(count<(proSockets-noSocketsPer)) {
			count+=(noSocketsPer-1);
			counter++;
		}
		count+=noSocketsPer;
			return ++counter;
	
}
}

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

private static int Contact() {
		Scanner in = new Scanner(System.in);
		int noSocketsPer= in.nextInt();//x
		int proSockets= in.nextInt();//y
		int count=0;
		int counter=0;
		if(noSocketsPer>=proSockets)
			return 1;
		
		while(count<(proSockets-noSocketsPer)) {
			count+=(noSocketsPer-1);
			counter++;
		}
		count+=noSocketsPer;
			return ++counter;
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
private static int Contact() {
               ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class Contact {
	public static void main(String[] args) {
		
Contact();
}

	private static int Contact() {
		Scanner in = new Scanner(System.in);
		int noSocketsPer= in.nextInt();//x
		int proSockets= in.nextInt();//y
		int count=0;
		int counter=0;
		if(noSocketsPer>=proSockets)
			return 1;
		
		while(count<(proSockets-noSocketsPer)) {
			count+=(noSocketsPer-1);
			counter++;
		}
		count+=noSocketsPer;
			return ++counter;
	}
}

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

import java.util.Scanner;

public class Contact {
	public static void main(String[] args) {
		
		 System.out.println(question());
	}

	private static int question() {
		Scanner in = new Scanner(System.in);
		int noSocketsPer= in.nextInt();//x
		int proSockets= in.nextInt();//y
		int count=0;
		int counter=0;
		if(noSocketsPer>=proSockets)
			return 1;
		
		while(count<(proSockets-noSocketsPer)) {
			count+=(noSocketsPer-1);
			counter++;
		}
		count+=noSocketsPer;
			return ++counter;
	}
}

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

#include<iostream>
#include<conio>

void main()
{
	int a,b,c;

	cout<<"Enter the number of sockets on the power strip";
	cin>>a;
	cout<<"Enter the number of empty sockets required";
	cin>>b;
	c=b/a;
	if(b%a!=0)
	c++;
	cout<<c;

}

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

#include<iostream.h>
#include<conio.h>

void main()
{
	int a,b,c;

	cout<<"Enter the number of sockets on the power strip";
	cin>>a;
	cout<<"Enter the number of empty sockets required";
	cin>>b;
	c=b/a;
	if(b%a!=0)
	c++;
	cout<<c;

}

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

void main()
{
	int a,b,c;

	cout<<"Enter the number of sockets on the power strip";
	cin>>a;
	cout<<"Enter the number of empty sockets required";
	cin>>b;
	c=b/a;
	if(b%a!=0)
	c++;
	cout<<c;

}

Compiler output:
a.cc:1:1: error: '::main' must return 'int'
    1 | void main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout<<"Enter the number of sockets on the power strip";
      |         ^~~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin>>a;
      |         ^~~
Language: C++

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

Compiler output:
a.cc:1:10: fatal error: bits\stdc++.h: No such file or directory
    1 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
int main()
{
  int a,b;
  while(cin>>a>>b){
    int num=1;
    while(a*(num++)<b);
    cout<<num<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   while(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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<num<<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:8:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<num<<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 <iostream>
#include <math>
using namespace std;
 
int main() {
  int A, B;
  cin >> A >> B;
  
  int ans = ceil((B - 1) / (A - 1));
  cout << ans << endl;
}

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

#include <iostream>
#include <math.h>
using namespace std;
 
int main() {
  int A, B;
  cin >> A >> B;
  
  int ans = ceil((B - 1) / (A - 1))
  cout << ans << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: expected ';' before 'if'
    7 |   cin>>a>>b
      |            ^
      |            ;
    8 |     if(b%a==0)
      |     ~~      
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else cout<<b/a+1;
      |   ^~~~
Language: C

#include<stdio.h>
int main(void){
int a,b,sum;
  scanf("%d %d",&a,&b);
  sum=b/aa;
  if(b%a!=0){
    sum++;
  }
  printf("%d",sum);
  return 0;
}

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

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

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

#include <iostream>
using namespace std;

int main() {
 int x;
  cin>>x;
  int y;
  cin>>y;
  
  int count=1;
 
  while(x<y){
     x=x-1+x;
     cout++;
   }
  cout<<count<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: no 'operator++(int)' declared for postfix '++' [-fpermissive]
   14 |      cout++;
      |      ~~~~^~
Language: C

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

int main(){
  int A,B,ans=1,sum=a;
  scanf("%d%d",&A,&B);
  if(B==1){
    printf("0\n");
    return 0;
  }
  while(sum<B){
    ans++;
    sum+=(A-1);
  }

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

Compiler output:
main.c: In function 'main':
main.c:5:21: error: 'a' undeclared (first use in this function)
    5 |   int A,B,ans=1,sum=a;
      |                     ^
main.c:5:21: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  int A,B,c=1;
  cin>>A>>B;
  if(A<B){
    while(A>B){
      A=A*c;
      c++;
    }
    cout<<c<<"\n";
  }
}else cout<<0<<"\n";


Compiler output:
a.cc:14:2: error: expected unqualified-id before 'else'
   14 | }else cout<<0<<"\n";
      |  ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
	int a, b;
  	cin >> a >> b;
  	cout << (b/a) + (b % a == 0 ? 0 : 1) << '\n';

Compiler output:
a.cc: In function 'int main()':
a.cc:6:54: error: expected '}' at end of input
    6 |         cout << (b/a) + (b % a == 0 ? 0 : 1) << '\n';
      |                                                      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
#include<stdio.h>
#include<string>
using namespace std;
#define pb push_back
#define pf push_front

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

#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define sz(x) int(x.size())
#define INF 1e5
int main(){
	int main(){
	int a,b;
	cin>>a>>b;
	if(a%b==0){
		cout<<b/a<<endl;
	}
	else{
		cout<<(b/a)+1<<endl;
	}
	return 0;
}

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

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

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

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

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

Compiler output:
a.cc:15:2: error: stray '#' in program
   15 | }#include <bits/stdc++.h>
      |  ^
a.cc:29:2: error: stray '#' in program
   29 | }#include <bits/stdc++.h>
      |  ^
a.cc:15:3: error: 'include' does not name a type
   15 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:18:5: error: redefinition of 'int main()'
   18 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
a.cc:29:3: error: 'include' does not name a type
   29 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:32:5: error: redefinition of 'int main()'
   32 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~