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

#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

// vectorの重複削除
// std::sort(test.begin(), test.end());
// test.erase(std::unique(test.begin(), test.end()), test.end());

using namespace std;
using ll = long long;
using P = pair<int, int>; // vector<P> ba(n); みたいな感じですぐ使える ba[i] = P(a, b); make_pairをしなくてもいい
// typedef vector<int> v;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v){o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
#define debug(v) {cerr<<"\033[1;36m[debug]\033[m "<<#v<<" : "<<v<<endl;}
#define rep(i, c) for(int i = 0; i < int(c); i++)
#define ALL(x) (x).begin(), (x).end() //sort(ALL(obj))みたいな
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値
#define pb push_back //
// const int MOD = 1000000007;
// string alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// printf("%.20f\n", ans); あれ
// const double PI = 3.141592653589793238462643383;

int main() {
  int a,b; cin>>a>>b;
  if (a>=b) {
    cout << '1' << endl;
  } else {
    if ((b-a)/(a-1)) == 0 {
      cout << '2' << endl;
    } else {
      cout << ((b-a)/(a-1) + 1) << endl;
    }
  }
}


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

#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<iterator>//集合演算(積集合,和集合,差集合など)
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列

// vectorの重複削除
// std::sort(test.begin(), test.end());
// test.erase(std::unique(test.begin(), test.end()), test.end());

using namespace std;
using ll = long long;
using P = pair<int, int>; // vector<P> ba(n); みたいな感じですぐ使える ba[i] = P(a, b); make_pairをしなくてもいい
// typedef vector<int> v;
template <class T>ostream &operator<<(ostream &o,const vector<T>&v){o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}
#define debug(v) {cerr<<"\033[1;36m[debug]\033[m "<<#v<<" : "<<v<<endl;}
#define rep(i, c) for(int i = 0; i < int(c); i++)
#define ALL(x) (x).begin(), (x).end() //sort(ALL(obj))みたいな
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値
#define pb push_back //
// const int MOD = 1000000007;
// string alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// printf("%.20f\n", ans); あれ
// const double PI = 3.141592653589793238462643383;

int main() {
  int a,b; cin>>a>>b;
  if (a>=b) {
    cout << '1' << endl;
  } else {
    if (b-a)/(a-1) == 0 {
      cout << '2' << endl;
    } else {
      cout << ((b-a)/(a-1) + 1) << endl;
    }
  }
}


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

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

int main() {
  int a, b, ret=0;
  cin >>a >>b;
  int i = 0;
  do {
    ret = ++i;
  } while (b > (a-1) * i + 1)
  cout << ret << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected ';' before 'cout'
   10 |   } while (b > (a-1) * i + 1)
      |                              ^
      |                              ;
   11 |   cout << ret << endl;
      |   ~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <ctime>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cassert>
#include <bitset>
#include <list>
#include <cstdio>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <cmath>
#include <tuple>
#include <cassert>
#include <array>
#include <iomanip>

using namespace std;
using pii = pair<int, int>;
using ti = tuple<int, int, int>;

const double eps=1e-14;
const int mod = 1e9 + 7;
const int inf = ((1<<30));
const long long linf = (1LL<<60);

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b;
    cin >> a >> b;
    int ans = 1;
    int tmp = a;
    while(a > b)
    {
        a += tmp-1:
        ans++;
    }
    cout << ans << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:44:19: error: expected ';' before ':' token
   44 |         a += tmp-1:
      |                   ^
      |                   ;
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
   10 |   if (A == B) {
      |   ^~
a.cc:12:5: error: 'else' without a previous 'if'
   12 |   } else if (T % B - A == 0) {
      |     ^~~~
Language: C++

#include<iostream>
using namespcae std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(b%a==0)
    cout<<b/a;
  else
  cout<<(b/a)+1;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcae'
    2 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     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
      |                  ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout<<(b/a)+1;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

clude<iostream>
using namespcae std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(b%a==0)
    cout<<b/a;
  else
  cout<<(b/a)+1;
}

Compiler output:
a.cc:1:1: error: 'clude' does not name a type
    1 | clude<iostream>
      | ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a>>b;
      |   ^~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<b/a;
      |     ^~~~
a.cc:10:3: error: 'cout' was not declared in this scope
   10 |   cout<<(b/a)+1;
      |   ^~~~
Language: C++

#include<iostream>
using namespcae std;
int main()
{
  int a,b;
  cin>>a>>b;
  cout<<(b/a)+1;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespcae'
    2 | using namespcae std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   cout<<(b/a)+1;
      |   ^~~~
      |   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<bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'as'?
   12 |     ans++;
      |     ^~~
      |     as
a.cc:14:9: error: 'ans' was not declared in this scope; did you mean 'as'?
   14 |   cout<<ans<<endl;
      |         ^~~
      |         as
Language: C++

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

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


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

// Boot_camp_Easy.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

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

void solve_1() {
	int a, b;
	cin >> a >> b;
	int total;
	int n = 0;
	while (!((a-1)*n + 1 >= b)) {
		n++;
	}
	cout << n << endl;

}

void solve_2() {

}

void solve_3() {

}

void solve_4() {

}

void solve_5() {

}

void solve_6() {

}

int main() {
	solve_1();
	//solve_2();
	//solve_3();
	//solve_4();
	//solve_5();
	//solve_6();
	return 0;
}

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

int main() {
  int a;
  int b;
  scanf('%d %d', $a, $b);
  
  if (a - b <= 0) std::cout << 1 << std::endl;;
  else {
    std::cout << 1 + (b - a) / (a - 1) <<std::endl;;
  }
}

Compiler output:
a.cc:4:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    4 |   scanf('%d %d', $a, $b);
      |         ^~~~~~~
a.cc: In function 'int main()':
a.cc:4:18: error: '$a' was not declared in this scope; did you mean 'a'?
    4 |   scanf('%d %d', $a, $b);
      |                  ^~
      |                  a
a.cc:4:22: error: '$b' was not declared in this scope; did you mean 'b'?
    4 |   scanf('%d %d', $a, $b);
      |                      ^~
      |                      b
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf('%d %d', $a, $b);
      |   ^~~~~
a.cc:6:24: error: 'cout' is not a member of 'std'
    6 |   if (a - b <= 0) std::cout << 1 << std::endl;;
      |                        ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:6:42: error: 'endl' is not a member of 'std'
    6 |   if (a - b <= 0) std::cout << 1 << std::endl;;
      |                                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main() {
a.cc:7:3: error: 'else' without a previous 'if'
    7 |   else {
      |   ^~~~
a.cc:8:10: error: 'cout' is not a member of 'std'
    8 |     std::cout << 1 + (b - a) / (a - 1) <<std::endl;;
      |          ^~~~
a.cc:8:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:47: error: 'endl' is not a member of 'std'
    8 |     std::cout << 1 + (b - a) / (a - 1) <<std::endl;;
      |                                               ^~~~
a.cc:8:47: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

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

Compiler output:
Main.java:13: error: cannot find symbol
    System.out.println(i);
                       ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:13: error: cannot find symbol
    System.out.println(count);
                       ^
  symbol:   variable count
  location: class Main
1 error
Language: Java

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

Compiler output:
Main.java:11: error: variable i might not have been initialized
    for(int i; b < sum; i++) {
                        ^
1 error
Language: Java

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

Compiler output:
Main.java:10: error: not a statement
    for(i; b < sum; i++) {
        ^
1 error
Language: Java

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

Compiler output:
Main.java:9: error: not a statement
    int = i
    ^
Main.java:9: error: ';' expected
    int = i
       ^
Main.java:9: error: not a statement
    int = i
          ^
Main.java:9: error: ';' expected
    int = i
           ^
Main.java:10: error: not a statement
    for(i; b < sum; i++) {
        ^
5 errors
Language: Java

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

Compiler output:
Main.java:13: error: cannot find symbol
    System.out.println(i-1);
                       ^
  symbol:   variable i
  location: class Main
1 error
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
    8 |   for (int i = 0; i++) {
      |                      ^
      |                      ;
Language: C++

nclude<stdio.h>
int main(void) {
	int t, n, m,k=100,kazu=1;

	scanf("%d%d", &n, &m);
	
		for (t = 0; t < k; t++) {
			if (kazu >= m) {
				printf("%d\n", t);
				break;
			}
			else {
				kazu = kazu - 1;
			}
			kazu = kazu + n;
			
		}
	
	return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<stdio.h>
      | ^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: invalid operands of types 'float' and 'float' to binary 'operator%'
    8 |   if(b%a==0){
      |      ~^~
      |      | |
      |      | float
      |      float
Language: Java

class Main{
  public static void main(String[] args){
   Scanner sc = new Scanner(System.in);
	int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    PrintWriter out = new PrintWriter(System.out);

    
    int res = 1;
    
    if(a < b){
    	while(a+(a-1)*res<=b){
        	res++;
        }
    }
    out.println(res);
    
    
  }
}

Compiler output:
Main.java:3: error: cannot find symbol
   Scanner sc = new Scanner(System.in);
   ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
   Scanner sc = new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
    PrintWriter out = new PrintWriter(System.out);
    ^
  symbol:   class PrintWriter
  location: class Main
Main.java:6: error: cannot find symbol
    PrintWriter out = new PrintWriter(System.out);
                          ^
  symbol:   class PrintWriter
  location: class Main
4 errors
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A = Integer.parseInt(sc.next()); 
    int B = Integer.parseInt(sc.next()); 
    if(A==B){
      
    System.out.println(1);
    }else{
    int ans = B/A+1;
    System.out.println(ans);
  }
}



Compiler output:
Main.java:14: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);B
    int A = Integer.parseInt(sc.next()); 
    int B = Integer.parseInt(sc.next()); 
    int ans = (B-1)/A + 1;


    System.out.println(ans);
  }
}



Compiler output:
Main.java:4: error: not a statement
    Scanner sc = new Scanner(System.in);B
                                        ^
Main.java:4: error: ';' expected
    Scanner sc = new Scanner(System.in);B
                                         ^
2 errors
Language: C++

#include <bits/stdc++.h>

using namespace std;

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

    int tap = 0;outlet = 1;
    
    while(outlet < b) {
        outlet--;
        outlet += a;
        tap++;
    }
    
    cout << outlet << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'outlet' was not declared in this scope
    9 |     int tap = 0;outlet = 1;
      |                 ^~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: expected primary-expression before '<' token
   14 |       cout<<2+a<<<endl;
      |                  ^
a.cc:16:5: error: expected '}' before 'else'
   16 |     else{
      |     ^~~~
a.cc:9:11: note: to match this '{'
    9 |   if (A<B){
      |           ^
a.cc: At global scope:
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected '}' before 'else'
   14 |   else {
      |   ^~~~
a.cc:7:11: note: to match this '{'
    7 |   if (A<B){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   cout<count<<endl;
      |        ~~~~~^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:14: error: 'i' was not declared in this scope
   16 |       num += i == 0 ? A : A - 1;
      |              ^
Language: C++

A,B=map(int, input().split())

if (A >= B):
  print(1)
else:
  cnt=0
  for i in range(1, A+1):
    if(i == A):
      cnt += A
    else:
      cnt += A-1
    if(cnt >= B):
      break
print(cnt)

Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A,B=map(int, input().split())
      | ^
Language: C++

#include <bits/stdc++.h>
2
3 using namespace std;
4
5 int main() {
6 int A, B; cin >> A >> B;
7 int ans = 0;
8 int outlet = 1;
9 while (outlet < B) {
10 --outlet;
11 outlet += A;
12 ++ans;
13 }
14 cout << ans << endl;
15 }


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4
      | ^
Language: C

#include<stdio.h>
int main()
{
	int a,b,k=0,t=0;

	scanf("%d%d",&a,&b);
	if(b<=1){
		printf("1")
		return 0;
	}
	while(k<=b){
		t++;
		k+=a;
		if(k>=b)
			break;
		k--;
	}
	printf("%d",t);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:28: error: expected ';' before 'return'
    8 |                 printf("1")
      |                            ^
      |                            ;
    9 |                 return 0;
      |                 ~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int A,B,X,Y,i;
    cin >> A >> B;
    X = 0;
    i = 0;
    Y = B; 
    if (B == 1) {
    cout << 0 << endl;
    return 0;
  }
  else{
    while(B>0){
        B = Y;
        i += 1;
        X += 1;
        B -= (A - 1)*(i - 1)+A;
        
    }
  }
    cout << X << endl;
    return 0;

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

include <iostream>
using namespace std;

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


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

#include <stdio.h>

int main(void) {
	int a, b;
	int num = 0;

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

	if (b == 0) {
		printf("1\n");
		return 0;
	}
	for (; b > 1; b++) {
		b -= a;
		num++;
	}
	printf("%d", num);

	return 0;
}

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

#include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <algorithm>
#include <iomanip>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>

#define rep(i,m,n) for(unsigned long long int i=(m);i<(n);++i)
#define rem(i,m,n) for(int i=(m);i>(n);--i)
#define MOD 1000000007

using namespace std;

using ll = long long int;
using std::swap;

vector<long long int> v;
vector<long long int> w;

int main() {
	int a, b;
	cin >> a >> b;
	if (b == 1) { cout << 0 << '\n'; return 0 }

	int ans = 1;
	b -= a;
	while (b > 0) {
		b -= a - 1;
		++ans;
	}
	cout << ans << '\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:50: error: expected ';' before '}' token
   28 |         if (b == 1) { cout << 0 << '\n'; return 0 }
      |                                                  ^~
      |                                                  ;
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <cstdlib>
#include <numeric>
#include <algorithm>
#include <iomanip>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <stdio.h>

#define rep(i,m,n) for(unsigned long long int i=(m);i<(n);++i)
#define rem(i,m,n) for(int i=(m);i>(n);--i)
#define MOD 1000000007

using namespace std;

using ll =long long int;
using std::swap;

vector<long long int> v;
vector<long long int> w;


int main() {
			int a, b;
			cin >> a >> b;
			a = i; b = j;
			
			int ans = 0;

			if (b == 1)ans = 0;
			else {
				b -= a;	ans++;
				while (b > 0) {
					b -= a - 1;
					++ans;
				}
			}	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:29: error: 'i' was not declared in this scope
   29 |                         a = i; b = j;
      |                             ^
a.cc:29:36: error: 'j' was not declared in this scope
   29 |                         a = i; b = j;
      |                                    ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ';' before ':' token
    8 |     now+=a-1:
      |             ^
      |             ;
Language: Java

Scanner scanner = new Scanner(System.in);

		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int i = 1;
		int c = 0;

		while(i < b) {
			i = i+a-1;
			c++;
		}
		System.out.println(c);
	    // Scannerクラスのインスタンスをクローズ
	    scanner.close();

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner scanner = new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:8: error: class, interface, enum, or record expected
		while(i < b) {
		^
Main.java:10: error: class, interface, enum, or record expected
			c++;
			^
Main.java:11: error: class, interface, enum, or record expected
		}
		^
Main.java:14: error: class, interface, enum, or record expected
	    scanner.close();
	    ^
5 errors
Language: Java

import java.util.Scanner;

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

		int a = scanner.nextInt();
		int b = scanner.nextInt();
		int i = 1;
		int c = 0;

		while(i < b) {
			i = i+a-1;
			c++;
		}
		System.out.println(c);
	    // Scannerクラスのインスタンスをクローズ
	    scanner.close();
	}
}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,k,temp,sum=0;
    cin>>n>>k;
    temp=k;
    if(k==1)
    {
         out<<0<<endl;
    }
    else if(n>=k)
    {
        cout<<"1"<<endl;
    }
    else
    {
       int flag=1, num=n-1;
       while(temp>n)
       {
           sum=sum+num;
           temp=k-sum;
           flag++;
       }
    cout<<flag<<endl;
    }
}

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

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

int main()
{
	float a, b;
	cin >> a >> b;
	int c = b / a;
	float d = b / a;
	if (d > c)
	{
		d = ciel(d);
		cout << d;
	}
	else
		cout << c;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'ciel' was not declared in this scope; did you mean 'ceil'?
   13 |                 d = ciel(d);
      |                     ^~~~
      |                     ceil
Language: C++

a, b = [int(x) for x in input().split()]

count = 1
b += -1
while b > 0:
    b += -(a - 1)
    count += 1
print(count)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b = [int(x) for x in input().split()]
      | ^
Language: C++

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

int main(){
  cin>>a>>b;
  int cnt = 0, a1 = 0;
  while(a1 > b){
    a1 += a;
  	cnt++; 
  }
  cout<<cnt<<endl;
}


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

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

int main(){
  cin>>a>>b;
  int cnt = 0;
  cnt = (b/a);
  cout<<cnt + 1<<endl;
}

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

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

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

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

int main() {
    int A,B;
    cin >> A >> B;
    int count=0;
    int input=1;
    }
    for(int i=0;i<30;i++)     
        input+=(A-1);
        count++;
        if(input>=B) break;
    }
    if(B==1) cout << 0 << endl;
    else cout << count << endl;
}


Compiler output:
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int i=0;i<30;i++)
      |     ^~~
a.cc:10:17: error: 'i' does not name a type
   10 |     for(int i=0;i<30;i++)
      |                 ^
a.cc:10:22: error: 'i' does not name a type
   10 |     for(int i=0;i<30;i++)
      |                      ^
a.cc:12:9: error: 'count' does not name a type
   12 |         count++;
      |         ^~~~~
a.cc:13:9: error: expected unqualified-id before 'if'
   13 |         if(input>=B) break;
      |         ^~
a.cc:14:5: error: expected declaration before '}' token
   14 |     }
      |     ^
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |     if(B==1) cout << 0 << endl;
      |     ^~
a.cc:16:5: error: expected unqualified-id before 'else'
   16 |     else cout << count << endl;
      |     ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

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

int main() {
    int A,B;
    cin >> A >> B;
    int count=0;
    int input=1;
    }
    for(int i=0;i<30;i++)     
        input+=(A-1);
        count++;
        if(input>=B) break;
    }
    if(B==1) cout << 0 << endl;
    else cout << count << endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> A >> B;
      |     ^~~
a.cc: At global scope:
a.cc:10:5: error: expected unqualified-id before 'for'
   10 |     for(int i=0;i<30;i++)
      |     ^~~
a.cc:10:17: error: 'i' does not name a type
   10 |     for(int i=0;i<30;i++)
      |                 ^
a.cc:10:22: error: 'i' does not name a type
   10 |     for(int i=0;i<30;i++)
      |                      ^
a.cc:12:9: error: 'count' does not name a type
   12 |         count++;
      |         ^~~~~
a.cc:13:9: error: expected unqualified-id before 'if'
   13 |         if(input>=B) break;
      |         ^~
a.cc:14:5: error: expected declaration before '}' token
   14 |     }
      |     ^
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |     if(B==1) cout << 0 << endl;
      |     ^~
a.cc:16:5: error: expected unqualified-id before 'else'
   16 |     else cout << count << endl;
      |     ^~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

l=list(map(int,input().split()))
plug=((l[1]-l[0])//(l[0]-1))+1
if (l[1]-l[0])%(l[0]-1)!=0:
    plug=plug+1
print(plug)

Compiler output:
a.cc:1:1: error: 'l' does not name a type
    1 | l=list(map(int,input().split()))
      | ^
Language: C++

import math
a, b = map(int, input().split())
print(math.ceil((b - 1) / (a - 1)))

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

a, b = map(int, input().split())

ans = 0
outlet = 1

while outlet < b:
    outlet -= 1
    outlet += a
    ans += 1

print(ans)

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

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


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

#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;

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

    return 0;
}

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

#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;

int main() {
    int  a, b;
    cin >> a >> b;
    if ( b == 1) {
        cout << 0 << endl;
        return 0;
    }
    if ((b -a) % (a -1) == 0) {
        ++tap;
        cout << tap << endl;
    } else {
        tap += 2;
        cout << tap << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:11: error: 'tap' was not declared in this scope
   18 |         ++tap;
      |           ^~~
a.cc:21:9: error: 'tap' was not declared in this scope
   21 |         tap += 2;
      |         ^~~
Language: C++

#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using ll = long long;
using namespace std;

int main() {
    int  a, b;
    cin >> a >> b;
    if ( b == 1) {
        cout << 0 << endl;
        return 0;
    }
    cout << tap << endl;
    if ((b -a) % (a -1) == 0) {
        ++tap;
        cout << tap << endl;
    } else {
        tap += 2;
        cout << tap << endl;
    }

    return 0;
}

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

using System;

class abc
{
    static void Main()
    {
        string[] O = Console.ReadLine().Split(' ');
        int A = int.Parse(O[0]);
        int B = int.Parse(O[1]);
        int c = 0;
        int i = -1;
        if (A == B)
        {
            Console.WriteLine("1");
            return ;
        }
            for (int ib = 0; c <= B; ib++)
        {
            c = (A * ib) - 1;
            i++;
        }
        Console.WriteLine(i);
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
a.cc: In static member function 'static void abc::Main()':
a.cc:7:9: error: 'string' was not declared in this scope
    7 |         string[] O = Console.ReadLine().Split(' ');
      |         ^~~~~~
a.cc:7:16: error: expected primary-expression before ']' token
    7 |         string[] O = Console.ReadLine().Split(' ');
      |                ^
a.cc:8:17: error: expected primary-expression before 'int'
    8 |         int A = int.Parse(O[0]);
      |                 ^~~
a.cc:9:17: error: expected primary-expression before 'int'
    9 |         int B = int.Parse(O[1]);
      |                 ^~~
a.cc:14:13: error: 'Console' was not declared in this scope
   14 |             Console.WriteLine("1");
      |             ^~~~~~~
a.cc:22:9: error: 'Console' was not declared in this scope
   22 |         Console.WriteLine(i);
      |         ^~~~~~~
Language: C++

#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>
#include <cassert>
#include <iomanip>
#include <chrono>

using namespace std;


class BPowerSocket {
public:
    void solve(std::istream &in, std::ostream &out) {
        int A, B;
        in >> A >> B;
        int n = 0;
        int answer = 1;

        while (answer < B) {
            n++;
            answer = A * n - (n - 1);
        }

        out << n << endl;
    }
};


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

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

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

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

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

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

Compiler output:
main.c: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,r,d,c=0,i;
    cin>>a>>b;
if(a<b){
    d=b/a;
    c=d+c;
    r=b%a;
    if(r!=0){
        c++;
    }
    cout<<c<<endl;

}
else if(a==b){
    cout<<"1"<<endl;
}
else
    cout<<"0"<<endl;



}


Compiler output:
main.c: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;
    int ans=0;
    cin>>a>>b;

    while(b>0){
        b/=a;
        ans++;
    }
    cout<<ans<<endl;


    return 0;
}
}

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

include<stdio.h>
int main()
{
    int A,B;
    scanf("%d %d", &A, &B);
    if(B%A==0){
    printf("%d\n",(B/A));
        }
     else{
      printf("%d\n",((B/A)+1));
        } 
    return 0;
}

Compiler output:
main.c:1:8: 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,n,i;

     cin>>a>>b;

     for(i=1;;i++)
     {
         if(a*i=b)
         {
             cout<<i+1<<endl;
             break;
         }

     }

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: lvalue required as left operand of assignment
   13 |          if(a*i=b)
      |             ~^~
Language: C++

#include <iostream>
using namespace std;

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

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

#include <bits/stdc++.h>
using namespace std;
 
#define faster ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define mp make_pair
#define mod 1000000007
#define qmod 998244353
#define endl "\n"
#define pb push_back
#define ff first
#define ss second
 
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
 
const int MOD = 1e9 + 7;
const int INF = 1e9 + 5;
const ll LINF = LLONG_MAX;
int main(){
	int a,b;
	cin>>a>>b;
	int ans=0;
	if(b>a){
		if(b%a==0)
			ans = b/a;
		else
			ans = b/a +1;
	}
	else{
		ans = 1;
	}
	cout<<ans;8
} 8

Compiler output:
a.cc: In function 'int main()':
a.cc:33:20: error: expected ';' before '}' token
   33 |         cout<<ans;8
      |                    ^
      |                    ;
   34 | } 8
      | ~                   
a.cc: At global scope:
a.cc:34:3: error: expected unqualified-id before numeric constant
   34 | } 8
      |   ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
	cin >> a >> b;
  	int ans = 0;
  	int outlet = 1;
  	//素直に考えると、電源口がB以上になるまでタップを挿し続けるということ。
  	//
	while(outlet < b){
    --outlet;//一個挿すと一個なくなる
    outlet += A;//挿すと電源口がA増える
    ans++;
    }  
  	cout << ans << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'A' was not declared in this scope
   13 |     outlet += A;//挿すと電源口がA増える
      |               ^
Language: C++

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

	int main(){
    int a,b;
		int n=1
      cin>>a>>b;
while(a*n<b+n-1){
     n++;
     }
    cout<<n<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: expected ',' or ';' before 'cin'
    7 |       cin>>a>>b;
      |       ^~~
Language: C++

fn main() {
    let ab = read_vec::<usize>();
    let a = ab[0];
    let b = ab[1];

    let mut ret = 0;
    for i in 1..1000 {
        if (a * i - (i - 1)) / b > 0 {
            ret = i;
            break;
        }
    }

    println!("{}", ret);
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect()
}


Compiler output:
a.cc:7:14: error: too many decimal points in number
    7 |     for i in 1..1000 {
      |              ^~~~~~~
a.cc:1:1: error: 'fn' does not name a type
    1 | fn main() {
      | ^~
a.cc:17:1: error: 'fn' does not name a type
   17 | fn read_vec<T: std::str::FromStr>() -> Vec<T> {
      | ^~
Language: C++

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

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

    int ans = 0;
    int outlet = 1

    while(outlet < B) {
        --outlet;
        outlet += A;
        ++ans;
    }

    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'while'
   12 |     while(outlet < B) {
      |     ^~~~~
Language: C++

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

int main(){
 int a.b;
 cin >> a >> b;
  
 int s = a-1;//増加分
 int t = b-1;//目標
 int ans=(t+s-1)/s;
  
 cout << ans << "\n";
}

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

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

Compiler output:
main.c: In function 'main':
main.c:7:19: error: 'B' undeclared (first use in this function)
    7 |   while (outlet < B) {
      |                   ^
main.c:7:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:14: error: 'A' undeclared (first use in this function)
    9 |    outlet += A;
      |              ^
Language: C

#include<stdio.h>
int main(void){
  char a,b;
  int ans=0;
  scanf("%s %s",a,b);
  if(a[0]==b[0]) ans++;
  if(a[1]==b[1]) ans++;
  if(a[2]==b[2]) ans++;
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[0]==b[0]) ans++;
      |       ^
main.c:6:13: error: subscripted value is neither array nor pointer nor vector
    6 |   if(a[0]==b[0]) ans++;
      |             ^
main.c:7:7: error: subscripted value is neither array nor pointer nor vector
    7 |   if(a[1]==b[1]) ans++;
      |       ^
main.c:7:13: error: subscripted value is neither array nor pointer nor vector
    7 |   if(a[1]==b[1]) ans++;
      |             ^
main.c:8:7: error: subscripted value is neither array nor pointer nor vector
    8 |   if(a[2]==b[2]) ans++;
      |       ^
main.c:8:13: error: subscripted value is neither array nor pointer nor vector
    8 |   if(a[2]==b[2]) ans++;
      |             ^
Language: C

#include<stdio.h>
int main(void){
  char a[10],b[10];
  int ans=0;
  scanf("%s %s",a,b);
  if(s[0] == t[0]) ans++;
  if(s[1] == t[1]) ans++;
  if(s[2] == t[2]) ans++;
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:6: error: 's' undeclared (first use in this function)
    6 |   if(s[0] == t[0]) ans++;
      |      ^
main.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:14: error: 't' undeclared (first use in this function)
    6 |   if(s[0] == t[0]) ans++;
      |              ^
Language: C

#include<stdio.h>
int main(void){
  char a[10],b[10];
  int ans=0;
  scanf("%d %d",&a,&b);
  if(s[0] == t[0]) ans++;
  if(s[1] == t[1]) ans++;
  if(s[2] == t[2]) ans++;
  printf("%d\n",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:6: error: 's' undeclared (first use in this function)
    6 |   if(s[0] == t[0]) ans++;
      |      ^
main.c:6:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:14: error: 't' undeclared (first use in this function)
    6 |   if(s[0] == t[0]) ans++;
      |              ^
Language: C++

#include<iostream>

int main(){
  	int a,b;
	std::cin>>a>>b;
  	int result=0;
  int out=1;
  while(out<=B){
  	result++;
    out+=a-1;
  }
  std::cout<<result<<std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'B' was not declared in this scope
    8 |   while(out<=B){
      |              ^