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

#include<string>
#include <iostream>
#include<vector>
#define T long long


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


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

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

Compiler output:
main.c: In function 'main':
main.c:5:17: error: invalid operands to binary % (have 'int *' and 'int')
    5 |   printf("%d",&b%a+1);
      |               ~~^
      |               |
      |               int *
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  int A,B;
  cin >> A >> B;
  int n=1;
  int count=0;
  int plus=A-1;
  while(n<=B){
    count++;
    n+=plus
  }
  cout << count;
  cout << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected ';' before '}' token
   14 |     n+=plus
      |            ^
      |            ;
   15 |   }
      |   ~
Language: C++

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

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

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

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

int main() {
  int N,M;
  cin >> N >> M;
  for (int i - 0; i < 20; i++) {
    if (N*i-i+1 >= M) {
      cout << i <<endl;
    }
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected ';' before '-' token
    7 |   for (int i - 0; i < 20; i++) {
      |             ^~
      |             ;
a.cc:7:25: error: expected ')' before ';' token
    7 |   for (int i - 0; i < 20; i++) {
      |       ~                 ^
      |                         )
a.cc:7:27: error: 'i' was not declared in this scope
    7 |   for (int i - 0; i < 20; i++) {
      |                           ^
Language: C++

import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
 

//result = Math.pow(num1, num3)
//StringBuffer str = new StringBuffer(hoge1);
//String hoge2 = str.reverse().toString();
//map.containsKey(A)

//Map<String, Integer> map = new HashMap<String, Integer>(n);
/*for ( キーのデータ型 key : マップの名前.keySet() ) {
	データのデータ型 data = マップの名前.get( key );
	
	// keyやdataを使った処理;
}*/
//int i = Integer.parseInt(s);
//Queue<String> qq=new ArrayDeque<>(); //add,poll,peek
//Deque<String> qq=new ArrayDeque<>();//push,pop,peek
//ArrayList<String> cc = new ArrayList<>(n);
//Collections.sort(list);
//Array.sort(list);
//Arrays.asList(c).contains("a")
//list.set(1,"walk");
public class Main {
	static int a1[]= {0,-1,0,1};
	static int b1[]= {-1,0,1,0};
	private static Scanner sc = new Scanner(System.in);
	static void p(String ans) {System.out.println(ans);};
	static void p(int ans) {System.out.println(ans);};
	static void p(long ans) {System.out.println(ans);};
	static void p(double ans) {System.out.println(ans);};
	static int K;
	public static void main(String[] args) {
		int a=sc.nextInt();
		int b=sc.nextInt();
		if(b==1) {
			p(0);
		}else {
		p((int)Math.ceil((double)(b-1)/(a-1)));
		}
		}	
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.ArrayDeque;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.ArrayList;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.Arrays;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Collections;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.HashMap;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.Map;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.Queue;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.Scanner;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:30:1: error: expected unqualified-id before 'public'
   30 | public class Main {
      | ^~~~~~
Language: C++

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


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout<<(b/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:7:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout<<(b/a)+1<<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)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int A , B , N ;
  cin >> A >> B ;
  N = 0;
  while(A + (A-1)* N) <= B){
    N++;
}
  cout << N + 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before '<=' token
    9 |   while(A + (A-1)* N) <= B){
      |                       ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int A , B , N ;
  cin >> A >> B ;
  N = 0;
  while(A + (A-1)* N) <= B){
    N++;
}
  cout << N + 1 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: expected primary-expression before '<=' token
    9 |   while(A + (A-1)* N) <= B){
      |                       ^~
a.cc:12:25: error: expected '}' at end of input
   12 |   cout << N + 1 << endl;
      |                         ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

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


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

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   int a,b; 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:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout<<ans<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<ans<<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)
      |     ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stdio.h>
#include <list>
#include <numeric>
#include <stack>
#include <queue>
#include <tuple>
#include <bitset>
#include <map>
#include <math.h>
 
using namespace std;
 
#define rep(i,n) for(int i = 0; i < (n); i++)
#define all(a) begin(a),end(a)
 
typedef long long ll;
typedef pair<int,int> P;
const int inf=1000000007;
const ll mod=1000000007;
const double PI=3.14159265358979323846;
 
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
 
ll gcd(ll a, ll b){
  if (b==0) return a;
  else return gcd(b,a%b);
}
 
int cans(bool f){
  if(f) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}
 


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



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

#include <bits/stdc++.h>
using namespace std;
// define #Asukaminato ha kawaii
#define ll long long
#define rep(i, m) for (int i = 0; i < (int)(m); i++)
const int inf = 1000000000; // 10^9 Ten to the power of nine.


int main() {
  int A,B;
	int ret = 0;
	int now = 1;
	while (now < B) {
		now += A- 1;
		res++;
	}
	cout << res << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'res' was not declared in this scope; did you mean 'ret'?
   15 |                 res++;
      |                 ^~~
      |                 ret
a.cc:17:17: error: 'res' was not declared in this scope; did you mean 'ret'?
   17 |         cout << res << endl;
      |                 ^~~
      |                 ret
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define ll long long
using namespace std;
int main(){
    int a,b;
    cin>>a>>b;
    cout<<ceil((double)(b-1)/(double)(a-1));
    return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=1;i<=400;i++){
      |       ^
main.c:5:7: 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 >> a >> b;
    
    if (b == 1){
        cout << 0 << endl;
        return 0;
    }

    int x = 1;
    while(true){
        if (a*x - x >>= b){
            cout << x << endl;
            return 0;
        }else{
            x++;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: lvalue required as left operand of assignment
   15 |         if (a*x - x >>= b){
      |             ~~~~^~~
Language: C++

#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
const ll MOD = 1e9+7;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   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 | #define _GLIBCXX_DEBUG
a.cc:10:12: error: 'cout' was not declared in this scope
   10 |   if(b==1) cout << 0 << endl;
      |            ^~~~
a.cc:10:12: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:25: error: 'endl' was not declared in this scope
   10 |   if(b==1) cout << 0 << endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #define _GLIBCXX_DEBUG
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |   else if(b<=a) cout << 1 << endl;
      |                 ^~~~
a.cc:11:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:30: error: 'endl' was not declared in this scope
   11 |   else if(b<=a) cout << 1 << endl;
      |                              ^~~~
a.cc:11:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout << (d+a-2)/k+1 << endl;
      |     ^~~~
a.cc:15:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:28: error: 'endl' was not declared in this scope
   15 |     cout << (d+a-2)/k+1 << endl;
      |                            ^~~~
a.cc:15:28: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
#define acc(v) accumulate(v.begin(), v.end(), 0)
#define cinv(n,v) rep(i,n) cin >> v[i]
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
int x_pos[4] = {1,0,-1,0}, y_pos[4] = {0,1,0,-1};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

char upper(char c){
	return c-0x20;
}

char lower(char c){
	return c+0x20;
}

void unique_vector(vector<int>& v){
	sort(all(v));
	v.erase(unique(all(v)), v.end());
}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//ユークリッドの互除法
//最大公約数
ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

//最小公倍数
ll lcm(ll x, ll y){
	ll g = gcd(x,y);
	return x/g*y;
}

ll myPow(ll x, ll n, ll m){
  if(n == 0)
    return 1;
  if(n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}

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


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
#define acc(v) accumulate(v.begin(), v.end(), 0)
#define cinv(n,v) rep(i,n) cin >> v[i]
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
int x_pos[4] = {1,0,-1,0}, y_pos[4] = {0,1,0,-1};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

char upper(char c){
	return c-0x20;
}

char lower(char c){
	return c+0x20;
}

void unique_vector(vector<int>& v){
	sort(all(v));
	v.erase(unique(all(v)), v.end());
}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//ユークリッドの互除法
//最大公約数
ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

//最小公倍数
ll lcm(ll x, ll y){
	ll g = gcd(x,y);
	return x/g*y;
}

ll myPow(ll x, ll n, ll m){
  if(n == 0)
    return 1;
  if(n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}

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


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

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define print(s) cout << s << endl
#define acc(v) accumulate(v.begin(), v.end(), 0)
#define cinv(n,v) rep(i,n) cin >> v[i]
using namespace std;
const int INF = 1e9;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vint;
typedef vector<string> vstr;
typedef vector<char> vchar;
const ll LINF = 1e18;
const ll MOD = 1e9 + 7;
int x_pos[4] = {1,0,-1,0}, y_pos[4] = {0,1,0,-1};
int ctoi(char c) {
	if (c >= '0' && c <= '9') {
		return c - '0';
	}
	return 0;
}

char upper(char c){
	return c-0x20;
}

char lower(char c){
	return c+0x20;
}

void unique_vector(vector<int>& v){
	sort(all(v));
	v.erase(unique(all(v)), v.end());
}

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

//ユークリッドの互除法
//最大公約数
ll gcd(ll x, ll y) {
  if (y == 0) return x;
  return gcd(y, x%y);
}

//最小公倍数
ll lcm(ll x, ll y){
	ll g = gcd(x,y);
	return x/g*y;
}

ll myPow(ll x, ll n, ll m){
  if(n == 0)
    return 1;
  if(n % 2 == 0)
    return myPow(x * x % m, n / 2, m);
  else
    return x * myPow(x, n - 1, m) % m;
}

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


Compiler output:
a.cc: In function 'int main()':
a.cc:70:23: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   70 |                 count << 0 << endl;
      |                 ~~~~~~^~~~
a.cc:71:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   71 |                 return;
      |                 ^~~~~~
Language: C++

//#include "stdafx.h"

using namespace std;

void func139b() {
    int a, b;
    cin >> a;
    cin >> b;

    int count = 0;
    while (b > 0) {
        if (b - a <= 0) {
            ++count;
            break;
        }
        b -= a - 1;
        ++count;
    }

    cout << count;

}

int main() {
    func139b();

    return 0;
}

Compiler output:
a.cc: In function 'void func139b()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin >> a;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | //#include "stdafx.h"
a.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout << count;
      |     ^~~~
a.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: Java

import java.util.*;
import java.io.*;
public class B139 {
    public static void main(String[] args) {
        Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        System.out.println(solve(in));
        
      }
      
      public static String solve(Scanner in) {

        int A = in.nextInt();
        int B = in.nextInt();
        int count = sock(A, B, 1);

        return String.valueOf(count);
      }

      public static int sock(int a, int b, int num) {
          if (num >= b) return 0;
          return 1 + sock(a, b-(a-1),num);
      }
      
    
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    int a,b;
    cin>>a>>b;
    int p=1;
    int i=0;
    while(1+(a-1)*i<=b){
        i++;
    }
    ans=i;
    
    cout<<ans<<endl;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(s,i, n) for (int i = (int)s; i < (int)(n); i++)
#define pb push_back
typedef long long ll;
  
int main(){
    int a,b;
    cin>>a>>b;
    int p=1;
    int i=0;
    while(1+2*i<=b){
        i++;
    }
    ans=i;
    
    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 |     ans=i;
      |     ^~~
      |     abs
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = 0;
        int t = 0;
        while(true){
            if(c <= 0){
                break;
            }
            c = b / a;
            if(0 <= c){
                c = b / a;
                s++;
            }
            s++;
        }    
    }
}

Compiler output:
Main.java:16: error: cannot find symbol
                s++;
                ^
  symbol:   variable s
  location: class Main
Main.java:18: error: cannot find symbol
            s++;
            ^
  symbol:   variable s
  location: class Main
2 errors
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = 0;
        int s = 0;
        while(true){
            if(c <= 0){
                break;
            }
            c = b / a;
            if(0 <= c){
                b / a;
                s++;
            }
            s++;
        }    
    }
}

Compiler output:
Main.java:15: error: not a statement
                b / a;
                  ^
1 error
Language: C++

using namespace std;
 
int main() {
  int A,B;
  cin>>A>>B;
  int count=1;
  int kazu=A;
  if(kazu>=B){
    cout<<1<<endl;
    return 0;
  }
  while(B>=kazu){
    kazu=kazu-1+A;
    count++;
    if(kazu>=B)break;
  }
  cout << count<<endl;
  return 0;
}

Compiler output:
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 | using namespace std;
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<1<<endl;
      |     ^~~~
a.cc:9:5: 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<<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 | using namespace std;
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << count<<endl;
      |   ^~~~
a.cc:17:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:18: error: 'endl' was not declared in this scope
   17 |   cout << count<<endl;
      |                  ^~~~
a.cc:17:18: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

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

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

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

int main() {
  int a, b;
  cin >> a >> b;
  
  int sum = a, count = 1;

  while (sum < b){
    sum += a-1;
    count++;
  }
  
  if (b == 1){
    cout << 0 << endl:
  }
  else {
    cout << count << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected ';' before ':' token
   16 |     cout << 0 << endl:
      |                      ^
      |                      ;
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int socket = sc.nextInt();
    int need = sc.nextInt();
    if(need = 1){
      System.out.println(0);
    }else if(socket == 1){
      System.out.println(need);
    }else if(need <= socket){
      System.out.println(1);
    }else if((need - socket) % (socket - 1) == 0){
      System.out.println(1 + (need - socket) / (socket - 1));
  }else{
    System.out.println(2 + (need - socket) / (socket - 1));
  }
}
}

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

#include <bits/stdc++.h>

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4")

#define ll long long
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define o cout<<"BUG"<<endl;
#define	IOS ios_base::sync_with_stdio(0);
#define en "\n"
#define FOR(i, j, n) for(int j = i; j < n; ++j)
#define forn(i, j, n) for(int j = i; j <= n; ++j)
#define nfor(i, j, n) for(int j = n; j >= i; --j)
#define sortv(vv) sort(vv.begin(), vv.end())
#define all(v) v.begin(), v.end()
#define ld long double
#define ull unsigned long long
#define pii pair <int, int>


using namespace std;
const ll maxn=5e5+100,inf=1e18,LOG=23,mod=1e9 + 7;
int block = 300, timer = 0;
const ld EPS = 1e-7;

#define bt(i) (1 << (i))
//#define int ll

int a, b;

main()
{
	cin >> a >> b;
	if(b == 1)
	{
		cout << 0;
		break;
	}
	cout << b / a + (bool)(b % a);
}

Compiler output:
a.cc:35:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   35 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:41:17: error: break statement not within loop or switch
   41 |                 break;
      |                 ^~~~~
Language: C++

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

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

    int C=A--;
    int D=1

    for(int i=0; i<30; i++){
     D+=C;
      if(D>=B){
        cout << i << endl;
       break;
      }
    }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'for'
   11 |     for(int i=0; i<30; i++){
      |     ^~~
a.cc:11:18: error: 'i' was not declared in this scope
   11 |     for(int i=0; i<30; i++){
      |                  ^
Language: Java

import java.util.Scanner;

public class Main {
        public static void main(String[] args) {
                Scanner sc = new Scanner(System.in);
                int A = sc.nextInt();
                int B = sc.nextInt();
                sc.close();
                int r = ((B - 1) + (A - 2)) / (A - 1);
                System.out.println(r + d) ;
        }
}


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

#include <iostream>
#include <string>

using namespace std;

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

  int num = 1;
  while(1)
  {
    if (B <= A * num - (num - 1))
    {
      cout << num << endl;
      return;
    }
    ++num;
  }
}

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

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

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

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

int main(int argc,char* argv[]){
	int a , b;
	cin >> a >> b;
	int ans;
	if(b==1) { cout << 0 << endl; return 0; }
	for(int i=1;i<=1000;++i)
		if( b <= a ) { ans = 1; break; }
		if((( i + 1 ) + ( a - 2 ) * i) >= b ) { ans = i; break; }
	}
 	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:11:23: error: 'i' was not declared in this scope
   11 |                 if((( i + 1 ) + ( a - 2 ) * i) >= b ) { ans = i; break; }
      |                       ^
a.cc:11:66: error: break statement not within loop or switch
   11 |                 if((( i + 1 ) + ( a - 2 ) * i) >= b ) { ans = i; break; }
      |                                                                  ^~~~~
a.cc: At global scope:
a.cc:13:9: error: 'cout' does not name a type
   13 |         cout << ans << endl;
      |         ^~~~
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll	    long long
#define vi      vector <int>
#define vii     vector <pair<int,int>>
#define ii      pair<int,int>
#define loop(n)	for(int i=0;i<n;i++)
ll mod=1e9+7;
bool is_prime(int n)
{
    if(n==2)
        return true;
    if(n%2==0||n<2)
        return false;
    for(int i=3; i<=sqrt(n); i+=2)
    {
        if(n%i==0)
            return false;
    }
    return true;
}
long long power(ll n, ll k){
    if(k==0) return 1;
    ll sq=(power(n,k/2))%mod;
    sq=(sq*sq)%mod;
    if(k%2==1)
        sq=(sq*n)%mod;
    return sq%mod;
}
void low(char &c){
c=tolower(c);
}
void primeFactors(int n)
{
    while (n % 2 == 0)
    {
        cout << 2 << " ";
        n = n/2;
    }

    for (int i = 3; i <= sqrt(n); i = i + 2)
    {
        while (n % i == 0)
        {
            cout << i << " ";
            n = n/i;
        }
    }

    if (n > 2)
        cout << n << " ";
}

#include <iostream>
using namespace std;
void fast();
long long arr[200005];
long long arr2[200005];


int main() {
fast();
double n,x;
cin >> n >> x;
cout <<(int) ceil(x/(n-1);

}





void fast(){
std::ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:26: error: expected ')' before ';' token
   65 | cout <<(int) ceil(x/(n-1);
      |                  ~       ^
      |                          )
Language: C++

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

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

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

int const N= 1e5;
int arr1[N];
int arr2[N];
int main()
{

int a,b;
cin>>a>>b;
int ans=a;
int count =1;
bool flag =false;
while(ans<b)
{
    ans+=a;
   // ans--;
    count++;
        ans--;

}
if(b==1)
    cout<<0
    else
cout<<count;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:12: error: expected ';' before 'else'
   24 |     cout<<0
      |            ^
      |            ;
   25 |     else
      |     ~~~~
Language: C++

ahashi's house has only one socket.

Takahashi wants to extend it with some number of power strips, each with 
A
 sockets, into 
B
 or more empty sockets.

One power strip with 
A
 sockets can extend one empty socket into 
A
 empty sockets.

Find the minimum number of power 

Compiler output:
a.cc:1:7: warning: missing terminating ' character
    1 | ahashi's house has only one socket.
      |       ^
a.cc:1:7: error: missing terminating ' character
    1 | ahashi's house has only one socket.
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'ahashi' does not name a type
    1 | ahashi's house has only one socket.
      | ^~~~~~
Language: C++

v#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
#define rep(i, n)    for(ll i = 0; i < (n); ++i)
#define repA(i, a, n)  for(ll i = a; i <= (n); ++i)
#define repD(i, a, n)  for(ll i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (ll)(x).size()
#define unique_sort(x) (sort(x.begin(), x.end()), x.resize(distance(x.begin(), unique(x.begin(), x.end()))))
#define fill(a)  memset(a, 0, sizeof (a))
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
typedef long double ld;
typedef pair<ll,ll> pll;
typedef vector<ll> vll;

int main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    ll tt=1;
        // cin >> tt;
    while((tt)--){
      ll a,b; cin >> a >> b;
     if((b-1)%(a-1)!=0) cout << (b-1)/(a-1)+1 << endl;
     else cout << (b-1)/(a-1) << endl;
	   
    }
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include<bits/stdc++.h>
      | ^
a.cc:18:9: error: 'pair' does not name a type
   18 | typedef pair<ll,ll> pll;
      |         ^~~~
a.cc:19:9: error: 'vector' does not name a type
   19 | typedef vector<ll> vll;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:23:5: error: 'ios' has not been declared
   23 |     ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |     ^~~
a.cc:23:34: error: 'cin' was not declared in this scope
   23 |     ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |                                  ^~~
a.cc:23:46: error: 'cout' was not declared in this scope
   23 |     ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
      |                                              ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  
  int A,B;
  cin >> A >> B;
  int ans =0;
  int cnt =1;
  
  while (cnt <=B){
    ans +=1
    cnt +=(A-1)
  }
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  
  int A,B;
  cin >> A,B;
  int ans =0;
  int cnt =1;
  
  while (cnt <=B){
    ans +=1
    cnt +=(A-1)
  }
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  
  int A,B;
  cin >> A,B;
  int ans =0;
  int cnt =1;
  
  while (cnt <=B){
    ans++
    cnt +=(A-1)
  }
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0;
  cin >> A,B;
    
 while(int i=0; (A-1)*i >= B-1; i++){
    A++;
 }
  cout << A;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ')' before ';' token
    8 |  while(int i=0; (A-1)*i >= B-1; i++){
      |       ~       ^
      |               )
a.cc:8:23: error: 'i' was not declared in this scope
    8 |  while(int i=0; (A-1)*i >= B-1; i++){
      |                       ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0;
  cin >> A,B;
    
 for(i=0; (A-1)*i >= B-1; i++){
    A++;
 }
  cout << A;
    
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0;
  cin >> A,B;
    
 for(i=0;(A-1)*i+1>=B;i++){
    A++;
 }
  cout << A;
    
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0,t=1,i=1;
  t = A*i-1
    cin >> A,B;
    
 for(i=0;A*i-1>=B;i++){
    A++;
 }
  cout << A;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'cin'
    6 |   t = A*i-1
      |            ^
      |            ;
    7 |     cin >> A,B;
      |     ~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0,t=1,i=1;
  t = Ai-1
    cin >> A,B;
    
 for(i=0;A*i-1>=B;i++){
    A++;
 }
  cout << A;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'Ai' was not declared in this scope; did you mean 'i'?
    6 |   t = Ai-1
      |       ^~
      |       i
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int A=0,B=0,t=1,i=1;
  t = Ai-1
    
 for(i=0;A*i-1>=B;i++){
    A++;
 }
  cout << A<< "/n";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'Ai' was not declared in this scope; did you mean 'i'?
    6 |   t = Ai-1
      |       ^~
      |       i
a.cc:8:22: error: expected ';' before ')' token
    8 |  for(i=0;A*i-1>=B;i++){
      |                      ^
      |                      ;
Language: C++



#include <bits/stdc++.h>

using namespace std;

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


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

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'outlet' was not declared in this scope; did you mean 'outlets'?
   12 |     outlet--;
      |     ^~~~~~
      |     outlets
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'coutn' was not declared in this scope; did you mean 'count'?
   10 |     coutn--;
      |     ^~~~~
      |     count
Language: C++

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




    int main(){
        int a, b;
        std::cin >> a >> b;
        int ans = 0;
        int outlet = 1;
        while (outlet < B)
        {
            --outlet;
            outlet += A;
            ++ans;
        }
        std::cout << ans << "\n";
        return 0;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'B' was not declared in this scope
   14 |         while (outlet < B)
      |                         ^
a.cc:17:23: error: 'A' was not declared in this scope
   17 |             outlet += A;
      |                       ^
Language: C++

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

int main()
{
int A,B,C,r=0;
  cin>>A>>B;
  for(int i=1;i<21;i++){
C=i*A-(i-1);
    r++;
    if(A>=B){
cout<<r<<endl;
      exit(0);
    }
  }
}
       

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'mamespace'
    2 | using mamespace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>A>>B;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 | cout<<r<<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:12:10: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 | cout<<r<<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)
      |     ^~~~
Language: C++

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

int main()
{
int A,B,C,r=0;
  cin>>A>>B;
  for(int i=1;i<21;i++){
C=i*A-(i-1);
    r++;
    if(A>=B){
cout<<r<<endl;
      exit(0);
    }
  }
}
       

Compiler output:
a.cc:1:1: error: '\U0000ff03include' does not name a type
    1 | ＃include<bits/stdc++.h>
      | ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin>>A>>B;
      |   ^~~
a.cc:12:1: error: 'cout' was not declared in this scope
   12 | cout<<r<<endl;
      | ^~~~
a.cc:12:10: error: 'endl' was not declared in this scope
   12 | cout<<r<<endl;
      |          ^~~~
a.cc:13:7: error: 'exit' was not declared in this scope
   13 |       exit(0);
      |       ^~~~
a.cc:1:1: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
  +++ |+#include <cstdlib>
    1 | ＃include<bits/stdc++.h>
Language: C++

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

int main (){
  int A,B;
  cin >>A>>B;
  if ((A>=B)&(B!=1)){
    cout <<"1"<<endl;
  }
  else if(B ==1){
    cout <<"0"<<endl;
  else{
    int sum =A;
    int count=1;
    while(sum<B){
      sum +=(A-1);
      count++;
    }
    cout <<count<<endl;
  }
}


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

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

void _main() {
    cin >> A >> B;
    int ans = (B - 1 + A - 2) / (A - 1);
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'void _main()':
a.cc:5:12: error: 'A' was not declared in this scope
    5 |     cin >> A >> B;
      |            ^
a.cc:5:17: error: 'B' was not declared in this scope
    5 |     cin >> A >> B;
      |                 ^
Language: C

int main()
{

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

if (a>=2 && a<=20 && b>=1 && b<=20){
   for (int i = 1  ; i<= 20 ; i++){
         if (a*i >= b){
            printf("%d",i);
            break;
         }

   }
}
else printf("inv");

Compiler output:
main.c: In function 'main':
main.c:5:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |     scanf("%d%d",&a,&b);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:5:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |     scanf("%d%d",&a,&b);
      |     ^~~~~
main.c:5:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:13: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   10 |             printf("%d",i);
      |             ^~~~~~
main.c:10:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:10:13: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:10:13: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:6: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   16 | else printf("inv");
      |      ^~~~~~
main.c:16:6: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:16:1: error: expected declaration or statement at end of input
   16 | else printf("inv");
      | ^~~~
Language: C++

#include <iostream>
#include<stdio.h>
using namespace std;

int main()
{
    int a,b;
    float sum ;
    scanf("%d%d",&a,&b);
    sum=b(float)/(float)a;
    if(sum>(int)sum){
        sum++;
    }
    printf("%d",(int)sum);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected primary-expression before 'float'
   10 |     sum=b(float)/(float)a;
      |           ^~~~~
a.cc:10:16: error: 'b' cannot be used as a function
   10 |     sum=b(float)/(float)a;
      |                ^