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

# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    A=S()
    B=S()
    out=0
    if A[0]==B[0]:
        out+=1
    if A[1]==B[1]:
        out+=1
    if A[2]==B[2]:
        out+=1
    print(out)


if __name__ == "__main__":
    main()

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:3: warning: missing terminating " character
    2 | """
      |   ^
a.cc:2:3: error: missing terminating " character
a.cc:4:3: warning: missing terminating " character
    4 | """
      |   ^
a.cc:4:3: error: missing terminating " character
a.cc:9:3: error: invalid preprocessing directive #N
    9 | # N = int(input())
      |   ^
a.cc:10:3: error: invalid preprocessing directive #A
   10 | # A = list(map(int,input().split())) # N row 1 column
      |   ^
a.cc:11:3: error: invalid preprocessing directive #A
   11 | # A = [int(input()) for _ in range(N)] # 1 row N column
      |   ^
a.cc:12:3: error: invalid preprocessing directive #S
   12 | # S = str(input()) # str(input()) == input() -> 'abc'
      |   ^
a.cc:13:3: error: invalid preprocessing directive #S
   13 | # S = list(input()) # abc -> ['a','b','c']
      |   ^
a.cc:14:3: error: invalid preprocessing directive #S
   14 | # S.replace('ABC','X') # "testABCABC" -> "testXX"
      |   ^
a.cc:15:3: error: invalid preprocessing directive #S
   15 | # S=numpp.assaray(S)=="#"
      |   ^
a.cc:2:1: error: expected unqualified-id before string constant
    2 | """
      | ^~
Language: C++

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
#define REP(var, a, b) for (int var = (a); var < (b); var++)
#define rep(var, n) for (int var = 0; var < (n); ++var)
#define ALL(c) (c).begin(), (c).end()
#define rALL(c) (c).rbegin(), (c).rend()
ll MOD = 1000000007;

int main() {
  //
  string s, t;
  cin>>s>>t;
  int cnt = 0;
  rep(i,3) {
    if (s[i]==t[i]) cnt++;
  }
  cout << cnt << endl
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:22: error: expected ';' before 'return'
   39 |   cout << cnt << endl
      |                      ^
      |                      ;
   40 |   return 0;
      |   ~~~~~~
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        /**
        int n = sc.nextInt();
        int[]arr = new int[n];
        for(int i  = 0;i<n;i++)
        {
            arr[i] = sc.nextInt();
        }
         **/
        String s1 =sc.nextLine();
        String s2 =sc.nextLine();
        long res= 0;
        for(int i =  0;i< s2.length();i++)
        {
            if(s2.charAt(i) == s1.charAt(i))
                res++;
        }
        System.out.println(res);

    }
}


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

#include<bits/stdc++.h>
#include<string.h>
#define ll long long int
#define fio ios_base::sync_with_stdio(false); cin.tie(NULL);
#define MAX_LIMIT 100000
#define mp 
#define pb push_back
#define bb back
#define CHARS_TOTAL 256
#define e endl
/* For counting number of digits, directly do floor(log10(n)+1)*/
using namespace std;

ll power(ll x, unsigned ll y)  //Power in O(logn)
{  
    ll temp;  
    if(y == 0)  
        return 1;  
    temp = power(x, y / 2);  
    if (y % 2 == 0)  
        return temp * temp;  
    else
    {  
        if(y > 0)  
            return x * temp * temp;  
        else
            return (temp * temp) / x;  
    }  
} 
int main(){
     string str,str1;
     ll c=0;
     cin>>str>>str1;
     for(i=0;str[i];i++){
         if(str[i]==str[i]){
             c++;
         }
     }
     cout<<c<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:10: error: 'i' was not declared in this scope
   34 |      for(i=0;str[i];i++){
      |          ^
Language: C++

#include<bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <functional>
#include<iostream>
#include <string>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define fro(i,j,n) for(int i=j;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    string x,y;
	cin >> x>> y;
    int ans=0;
    fr(i,n){
      if(x[i]==y[i])ans++;
    }
      cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'n' was not declared in this scope
   19 |     fr(i,n){
      |          ^
a.cc:10:31: note: in definition of macro 'fr'
   10 | #define fr(i,n) for(int i=0;i<n;i++)
      |                               ^
Language: C++

import sys
input = sys.stdin.readline
from operator import itemgetter

def main():
	v = input().strip()
	v2 = input().strip()
	ans = 0
	for i in range(3):
		if v[i] == v2[i]:
			ans += 1
	print(ans)

if __name__ == '__main__':
	main()


Compiler output:
a.cc:14:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   14 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import sys
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <bits/stdc++.h>
#define ll long long 
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define pii pair<int , int>
#define mpi make_pair
#define F first
#define S second
#define pb push_back
#define fl(i , n) for(int i = 0;i<n;i++)


int main()
{	
	fastio;
    string s ,t;
    cin>>s>>t;

    int cnt = 0;
    for(int i = 0 ; i <3;i++)
    {
        if(s[i] == t[i])ans++;
    }

    cout<<ans<<endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |         if(s[i] == t[i])ans++;
      |                         ^~~
      |                         abs
a.cc:26:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   26 |     cout<<ans<<endl;
      |           ^~~
      |           abs
Language: C++

//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//Abdulhamid Han
//Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█
 
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
 
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long lo;
typedef pair< lo,lo > PII;
 
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)
 
const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 500005;
const lo mod = 1000000007;
 
int n,m,b[li],a[li],k,flag,t;
int cev;
string s;
vector<int> v;
 
int main(void){
	cin>>s;
	cin>>ss;
	for(int i=0;i<(int)s.size();i++){
		if(s[i]==ss[i])cev++;
	}
	printf("%d\n",cev);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:14: error: 'ss' was not declared in this scope; did you mean 's'?
   43 |         cin>>ss;
      |              ^~
      |              s
Language: C++

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

int main(){
  string s,t;
  cin >> s>>t;
  int ans =0;
  for(int i=0;i<s.size();i++){
    if(s.at(i)==s.at(t)){
      ans++;
}  }
cout << ans << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(std::string&)'
    9 |     if(s.at(i)==s.at(t)){
      |                 ~~~~^~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:20: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1287 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:20: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1309 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
Language: C

#include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <utility>
#include <vector>

using namespace std;
using ll = long long int;

template <class T> ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto i = v.begin(); i != v.end(); i++) {
    os << *i << " ";
  }
  return os;
}

ll gcd(ll a, ll b) {
  ll tmp;
  if ( b > a) {
    tmp = a;
    a = b;
    b = tmp;
  }
  while (a % b !=0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return b;
}

ll lcm(ll a, ll b) {
  return a * b / gcd(a, b);
}

int main(void) {
  string s;
  string t;
  cin>>s>>t;
  int c=0;
  for(int i=0; i<3; i++) {
    if(s[i]==t[i])
      c++;
  }
  std::cout << c << std::endl;
  return 0;
}



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

package main

import "fmt"

func main() {
	var a, b int
	_, _ = fmt.Scan(&a, &b)
	var sum = 1
	var cnt = 0
	for ;sum < b; {
		sum --
		sum += a
		cnt++
	}
	fmt.Println(cnt)
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

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


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

#include<bits.stdc++.h>
using namespace std;
int main()
{
	int a,b,soc=0;
 	while(b>soc)
      soc+=a;
  	cout<<soc/a;
}


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

#incluide<bits.stdc++.h>
using namespace std;
int main()
{
	int a,b,soc=0;
 	while(b>soc)
      soc+=a;
  	cout<<soc/a;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incluide; did you mean #include?
    1 | #incluide<bits.stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<soc/a;
      |         ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incluide<bits.stdc++.h>
Language: C++

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

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

#include<iostream>
using namespace std;

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


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

#include <stdio.h>
#include <math.h>

int main(void){

  double A, B;
  int c;
  
  scanf("%f %f",&A,&B);
  c = ceil(double(B-1)/double(A-1));
  printf("%d",c);
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:12: error: expected expression before 'double'
   10 |   c = ceil(double(B-1)/double(A-1));
      |            ^~~~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:9:9: error: lvalue required as left operand of assignment
    9 |     out = out+A;
      |         ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:9:9: error: lvalue required as left operand of assignment
    9 |     out += A;
      |         ^~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:8:17: error: 'i' undeclared (first use in this function)
    8 |   printf("%d\n",i);
      |                 ^
main.c:8:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:10:20: error: expected ';' before ')' token
   10 |     for(int i=2;i++){
      |                    ^
      |                    ;
Language: C++

#include<bits/stdc++.h>
using nameprace std;
using ll = long long;
#define rep(i,x,y)for(ll
i=x; i<y i++)

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

for(intc=0; b<a, c++)(
    b=+a
)
print(c)
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameprace'
    2 | using nameprace std;
      |       ^~~~~~~~~
a.cc:5:1: error: 'i' does not name a type
    5 | i=x; i<y i++)
      | ^
a.cc:5:6: error: 'i' does not name a type
    5 | i=x; i<y i++)
      |      ^
Language: C++

#include <bits/stdc++.h>

int main(){
  unsigned char a, b;
  cin >> a >> b;
  
  unsigned char unused;
  /*
    1:4 = a
    2:7 = 2a - 1
    3:10 = 3a -2
    4:13 = 4a - 3
    5:16 = 5a -4
    */
  unused = b/a;
  if(b> (a*(unused+1)) - unused) unused++;
  cout << unused << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << unused << 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:17:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << unused << 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>

int main(){
  unisigned char a, b;
  cin >> a >> b;
  
  unsigned char unused;
  /*
    1:4 = a
    2:7 = 2a - 1
    3:10 = 3a -2
    4:13 = 4a - 3
    5:16 = 5a -4
    */
  unused = b/a;
  if(b> (a*(unused+1)) - unused) unused++;
  cout << unused << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'unisigned' was not declared in this scope; did you mean 'unsigned'?
    4 |   unisigned char a, b;
      |   ^~~~~~~~~
      |   unsigned
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:10: error: 'a' was not declared in this scope
    5 |   cin >> a >> b;
      |          ^
a.cc:5:15: error: 'b' was not declared in this scope
    5 |   cin >> a >> b;
      |               ^
a.cc:17:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |   cout << unused << 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:17:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |   cout << unused << 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;
using ll=long long;
using Graph = vector<vector<ll>>;
int main(){
  ll A,B;
  cin>>A>>B;
  for(ll c=1;;c++){
    if(A*c-c+1>B&&B>A*C-A-C+2){
      cout<<c<<endl;
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:23: error: 'C' was not declared in this scope
    9 |     if(A*c-c+1>B&&B>A*C-A-C+2){
      |                       ^
Language: C++

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

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

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

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

  

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


import java.io.*;
import java.util.*;
import java.lang.*;

public class powerSocket {
    public static FScanner sc;
    public static PrintWriter out;
    public static void main(String[] args) {
        sc=new FScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int a = sc.nextInt();
        int b = sc.nextInt();
        int oneSocket = 1;
        int ans = 0;
        while(oneSocket < b){
            oneSocket += a - 1;
            ans++;
        }
        System.out.println(ans);



        out.close();

    }

    public static class FScanner {
    BufferedReader br;
    StringTokenizer st;

    public FScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}
}

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


import java.io.*;
import java.util.*;
import java.lang.*;

public class powerSocket {
    public static FScanner sc;
    public static PrintWriter out;
    public static void main(String[] args) {
        sc=new FScanner();
        out=new PrintWriter(new BufferedOutputStream(System.out));

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = a;
        int ans = 1;
        while(a < b){
            a += c - 1;
            ans++;
            out.println(c);
        }
        out.println(ans);



        out.close();

    }

    public static class FScanner {
    BufferedReader br;
    StringTokenizer st;

    public FScanner() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}
}

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

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
 
using ull = unsigned long long int;
using ll = long long int;
using du = double;
using ld = long du;
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;
using vdu = vector<du>;
using vs = vector<string>;
using vc = vector<char>;
using si = set<int>;
using sll = set<ll>;
using sdu = set<du>;
using sld = set<ld>;
using pii = pair<int, int>;
using pll = pair<ll,ll>;
using pdu = pair<du,du>;
using pld = pair<ld,ld>;
using pis = pair<int,string>;
 
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define sp(x) setprecision(x)<<fixed
#define loop(i,n) for(int i=0;i<n;i++)
#define ff first
#define ss second
#define pi acos(-1)
#define meme(a,x) memset(a,x,sizeof(a))
 
//debugger
 
#ifdef KAIZER
#include "debug.h"
#else
#define debug(x...)
#endif
//debugger
 
//functions
bool check_pow(ll a)
{
    if((a&(a-1))==0) return true;
    else return false;
}
ld my_pow(ld a,int b)
{
    ld ans=1;
    for(int i=0;i<b;i++) ans*=a;
    return ans;
}
ll digits(ll a)
{
    string line=to_string(a);
    return line.size();
}
bool prime_check(ll a)
{
    bool flag=true;
    for(ll i=2;i<=sqrt(a);i++)
    {
        if(a%i==0) {flag=false; break;}
    }
    return flag;
}
bool comp(const ll &a , const ll &b)
{
    return a>b;
}
const ll xyz=2e5+10;
ll fact[xyz];
void mod_fact(ll m=1)
{
    fact[0]=1;
    loop(i,(2e5)) 
    {
        ll p=i+1;
        //if(p%2==0) p/=2;
        fact[i+1]=(((fact[i])%m)*(p%m))%m;
    }
}

//functions


int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    FASTIO;
    int a,b;
    cin>>a>>b;
    ll n=1;
    ll ans=0;
    while(n<b)
    {
        n+=(a-1);
        ans++;
    }
    cout<<ans<<endl;
}
 

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

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

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


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

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

int main()
{
  int a,b;
  int n;
  int cnt=0;

  cin >> a >> b;

  n=a, cnt++;
  while(n<b)
  {
    n+=a-1;
    cnt++;
  }

  cout << cnt << endl;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ';' before ')' token
   14 |   ans = ((A-1) + (B-2))/(B-1));
      |                              ^
      |                              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B;
  int ans;
  cin >> A >> B;

  if(B == 1){
      cout << "0" << endl;
      return 0;
  }
  
  ans = ((A-1) + (B-2))/(B-1))
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ';' before ')' token
   14 |   ans = ((A-1) + (B-2))/(B-1))
      |                              ^
      |                              ;
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 <bits/stdc++.h>
using namespace std;
int main(){

  cin>>A>>B;
  int count_butu=0,count_ana=1;
  while(count_ana<B){
    count_butu++;
    count_ana+=A-1;
    }
  cout<<count_butu<<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;
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  #define int long long
  #define endl "\n"
  #define all(v) v.begin(),v.end()
  #define double long double
  #define trace1(x)                cerr<<#x<<": "<<x<<endl
  #define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
  #define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
  #define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
  #define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<< ": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
  #define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
  #define cases int testcases;cin>>testcases; while(testcases--)
  const int N = 200005;



int32_t main()
{


    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    IOS

    int a,b;
    cin >> a >> b;
    if(b == 1)cout << 0
    else if(a >= b)cout << 1;
    else cout << (b-a)/(a-1) + bool((b-a)%(a-1)) + 1;







    return 0;
}


Compiler output:
a.cc: In function 'int32_t main()':
a.cc:31:24: error: expected ';' before 'else'
   31 |     if(b == 1)cout << 0
      |                        ^
      |                        ;
   32 |     else if(a >= b)cout << 1;
      |     ~~~~
Language: C++

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: break statement not within loop or switch
   19 |     break;
      |     ^~~~~
a.cc:21:20: error: continue statement not within a loop
   21 |                    continue;
      |                    ^~~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: break statement not within loop or switch
   18 |     break;
      |     ^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: break statement not within loop or switch
   19 |     break;
      |     ^~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected primary-expression before ')' token
   17 |   if(B <= A + (A - 1) * C;){
      |                           ^
a.cc:19:5: error: break statement not within loop or switch
   19 |     break;
      |     ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: expected primary-expression before ')' token
   17 |   if(B <= A + (A - 1) * C;){
      |                           ^
a.cc:19:5: error: break statement not within loop or switch
   19 |     break;
      |     ^~~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected ';' before '}' token
   14 |   A + (A-1) * C
      |                ^
      |                ;
   15 | 
   16 |   }
      |   ~
Language: C++

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

int main(){
    int A,B,C;
    cin >> A >> B;
 if (B == 1){
 cout << 0 << endl;
 }
  else if (B <= A){
  cout << 1 << endl;
  }
  else if (B > A){
  A + (A-1) * n
  }
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:12: error: expected ';' before 'n'
   14 |   A + (A-1)n
      |            ^
      |            ;
Language: C++

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

#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384


int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} 
int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;}    //最大公約数
int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;}     //最小公倍数
int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} //コンビネーション
int nHr(int a,int b){return nCr(a+b-1,b);}       // 重複組み合わせ
int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}  //階乗
int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} // a~bまでの階乗
int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;}   //数字の各位の和
int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;}  // b進数の各位の和？
int sankaku(int x){return ((1+x)*x)/2;} //三角数 xまでの和

//以下long long ver
long long llmax(long long a,long long b){if(a>b){return a;}return b;}
long long llmin(long long a,long long b){if(a<b){return a;}return b;}
long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);}
long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;}
long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;}
long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;}
long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;}
long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
long long llnHr(long long a,long long b){return llnCr(a+b-1,b);}
long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;}
long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;}
long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;}
long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;}
long long llsankaku(long long x){return ((1+x)*x)/2;}

//double
double dbmax(double a,double b){if(a>b){return a;}return b;}
double dbmin(double a,double b){if(a<b){return a;}return b;}
double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);}


typedef pair<int, int> ii;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
#define forr(i,a,b) ; for(int i=(a); i<(b); i++)
#define clean(arr,val) memset(arr,val,sizeof(arr))
#define forn(i,n) forr(i,0,n)
#define PB push_back
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<pll> vpll;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

 
/*CODE START HERE*/
int main() {
  int a,b;
  cin >> a >> b;
  int sum = 1
    while ( sum < b){
      sum += a-1
    }
  cout << sum << endl;
}

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

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

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

/*
 * a.cc:
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<iomanip>

using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

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

  int sum=1;
  int num=0;

  while (sum<B){
    sum--;
    sum+=A-1;
    num++;

    
    
  }
  cout<<num_1<<endl;
  return 0;
  
  

  
}


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

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

int main() {
  int a,b;
  cin >> a >> b;
  int sum=a
    int ans = 1
  for ( ; ; ans++){
    if (sum < b){
      sum+= a-1 ;
    }else break;
   }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'int'
    8 |     int ans = 1
      |     ^~~
a.cc:9:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   for ( ; ; ans++){
      |             ^~~
      |             abs
Language: C++

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

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

#include<stdio.h>
#include<iostream>
int main(){
  int a,b,con=1,ans=0;
  cin>>a>>b;  
  while(con<b){
    con=con-1+a;
    ans++;
  }
  cout<<ans<<endl;
  return 0;
}


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

#include <bits/stdc++.h>

using namespace std;

int main() {
  int N, M, A; cin>>N; cin>>M;
  
  if(M >= 2 && M <= 20 && N >= 1 && N <= 20){
    if(M%N==0)A = M/N;
    else A = M%N + 1;
  }
  cout<<A;
  return 0;
}

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: expected ';' before '}' token
   11 |     C+=A
      |         ^
      |         ;
   12 |     }
      |     ~    
a.cc:14:13: error: expected ';' before '}' token
   14 |       C+=A-1
      |             ^
      |             ;
   15 |     }
      |     ~        
a.cc:16:8: error: expected ';' before '}' token
   16 |     i++
      |        ^
      |        ;
   17 |   }
      |   ~
Language: C++

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

}


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

#include <iostream>
 
using namespace std;
 
int main(){
  int A, B;
  cin >> A >> B;
  if(A >= B){
    printf("1\n");
  }
  else{
    printf("%d\n", 2 + B/(A-1))
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before '}' token
   12 |     printf("%d\n", 2 + B/(A-1))
      |                                ^
      |                                ;
   13 |   }
      |   ~
Language: C++

#include <iostream>

using namespace std;

int main(){
  int A, B;
  cin >> A >> B;
  if(A == B){
    printf("1\n");
  }
  else{
    printf("%d\n", 2 + B/(A-1))
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected ';' before '}' token
   12 |     printf("%d\n", 2 + B/(A-1))
      |                                ^
      |                                ;
   13 |   }
      |   ~
Language: C

#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll n,m;
    cin>>n>>m;
    ll ans=ceil(m/(double)n);
    cout<<ans<<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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

using namespace std;
using ll = long long;
using P = pair<int, int>;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'A' does not name a type
   12 |   const A = a;
      |         ^
a.cc:17:12: error: 'A' was not declared in this scope
   17 |       a += A -1;
      |            ^
Language: C++

#include<iostream>
using namespace std;

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

    ans = 0;
    while ((a-1) * ans + 1 < b) {
        ans++;
    }

    cout << ans << endl;
}

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

#include<iostream>
using namespace std;

int main() {
    int a, b;

    ans = 0;
    while ((a-1) * ans + 1 < b) {
        ans++;
    }

    cout << ans << endl;
}

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

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

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected ';' before 'break'
   10 |       n++
      |          ^
      |          ;
   11 |       break;
      |       ~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before '>' token
    9 |     if(A * i - (i - 1) => B){
      |                         ^
Language: C++

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: expected primary-expression before '>' token
    9 |     if(A * i - (i - 1) => B){
      |                         ^
a.cc:15:11: error: 'i' was not declared in this scope
   15 |   cout << i << endl;
      |           ^
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;
const double PI = 3.14159265358979323846;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |   cout << ans << endl;
      |           ^~~
      |           abs