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

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

int main() {
  
  int n;
  cin >> n;

  int ans = 0;
  int answer = 0;
  for(int i=1; i<=n; i++){
  	for(int j=1; j<=i j++){
  		if(n % i == 0){
  			ans += 1
  		}
 	 }
 	 if(ans == 8){
 	 	answer += 0;
 	 }
 	 i++;
  }



  cout << answer << '\n';

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before 'j'
   13 |         for(int j=1; j<=i j++){
      |                          ^~
      |                          ;
a.cc:15:33: error: expected ';' before '}' token
   15 |                         ans += 1
      |                                 ^
      |                                 ;
   16 |                 }
      |                 ~
Language: C

#include<stdio.h>

int main(void)
{
    int i,n,count=0;
    scanf("%d", &n);

    for(i=1;i<=n;i++){
        if(n % i == 0) count++;
    }
    if(count==8 && (n % 2 != 0) printf("1\n");
    else printf("0\n");
}

Compiler output:
main.c: In function 'main':
main.c:11:32: error: expected ')' before 'printf'
   11 |     if(count==8 && (n % 2 != 0) printf("1\n");
      |       ~                        ^~~~~~~
      |                                )
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <queue>
#include <cmath>
using namespace std;
const int maxn=1456;
bool sieve[maxn];
int sp[maxn];
void prmgen2()//quick factorisation of numbers<10^6
{
	memset(sieve+2,1,sizeof(sieve)-2);
	int len=sqrt(maxn)+1;
	for(int i=2;i<=len;i++)
		if(sieve[i])
		{
			sp[i]=i;
			for(int j=i*i;j<maxn;j+=i)
				if(sp[j]==0)
				{
					sieve[j]=0;
					sp[j]=i;
				}
		}
	for(int i=len+1;i<maxn;i++)
		if(sieve[i])
			sp[i]=i;
}
int arr[1000];
int main()
{
    prmgen2();
    int n;
    cin >> n;
    int cnt = 0;
    for (int i = 1; i<= n; i+=2){
        fill(arr, arr + i+1, 0);
        int temp = i;
        while(temp>1){
            arr[sp[temp]]++;
            temp/=sp[temp];
        }
        temp = 1;
        for (int j = 1; j*j <= i; j++){
            temp *= (arr[j] +1);
        }
        if (temp == 8)
            cnt++;
    }
    cout << cnt;
	return 0;
}	


Compiler output:
a.cc: In function 'void prmgen2()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(sieve+2,1,sizeof(sieve)-2);
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <cmath>
  +++ |+#include <cstring>
    7 | using namespace std;
Language: C++

#include <iostream>

using namespace std;

int main(void)
{
	int x,y,ans;
	cin>>x;
	ans=0;
	for(int i=1;i<=x;i++)
	{
		if(i%2==0)
			continue;
		y=0;
		for(int j=1;j<=sqrt(i);j++)
			if(i%j==0)
				y+=2;
		if(i==sqrt(i)*sqrt(i))
			y--;
		if(y==8)
			ans++;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:32: error: 'sqrt' was not declared in this scope
   15 |                 for(int j=1;j<=sqrt(i);j++)
      |                                ^~~~
a.cc:18:23: error: 'sqrt' was not declared in this scope
   18 |                 if(i==sqrt(i)*sqrt(i))
      |                       ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:21: error: expected primary-expression before ')' token
    4 |         scanf("%d",&);
      |                     ^
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		if(n<105){
			System.out.println(0);
		}else if(n<135){
			System.out.println(1);
		}else if(n<165){
			System.out.println(2);
		}else if(n<195){
			System.out.println(3);
		}else{
			System.out.println(4);
		}	
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: Java


public class Main {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int ans=0;
        for(int i=1;i<=n;i+=2){
            double sq=Math.sqrt(i);
            int count=0;
            for(int j=1;j<=sq;j++){
                if(i%j==0){
                    count+=2;
                }
            }
            if(count==8){
                ans+=1;
            }
        }
        System.out.println(ans);
    }    
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a;
for(int i=1;i<=n;)
{for(int j=1;j<=i;)
{if(i%j==0)
b++;
j=j+2;}
if(b==8)
c++;
i=i+2;}
cout<<c;
}


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

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

#define loop(i,N) for(ll (i)=0; (i)<(N);++(i))
#define OMAZINAI cin.tie(0); ios::sync_with_stdio(false);
#define INF (1LL<<61)
typedef long long int ll;

int flag[300];
int main() {
	OMAZINAI;
	std::vector<int> tmp = { 3, 5, 7, 11, 13, 17 };
	int cnt = 0, N, t;
	cin >> N;
	auto add = [&](int n) {
		if(n <= N)
			if (!flag[n]) {
				++cnt;
				flag[n] = 1;
			}
	};
	for (int i : tmp)
			add(std::pow(i, 7));
	for (int i : tmp)
		for (int n : tmp)
			if (i - n)
				add(i*pow(n, 3));
	for (int i : tmp)
		for (int n : tmp)
			for (int t : tmp)
				if (i - n && n - t && t - i)
					add(i*n*t);
	cout << cnt << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:34: error: 'pow' is not a member of 'std'
   26 |                         add(std::pow(i, 7));
      |                                  ^~~
a.cc:30:39: error: 'pow' was not declared in this scope
   30 |                                 add(i*pow(n, 3));
      |                                       ^~~
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <iostream>
#include <cmath>
#include <map>
#include <queue>
#include <algorithm>
#include <set>
#include <vector>
#include <stack>
#define Clear( x , y ) memset( x , y , sizeof(x) );
#define Qcin() std::ios::sync_with_stdio(false);
using namespace std;
typedef long long LL;
const int Maxn = 1e6 + 7;
const int Inf = 1e9 + 7;
int N , M;
int main()
{
	while( cin >> N ){
		if( N >= 105 )	cout << "1" << endl;
		else	cout << "0" <, endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:38: error: expected primary-expression before ',' token
   24 |                 else    cout << "0" <, endl;
      |                                      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdlib>
#include <cmath>

using namespace std;

bool is_prime(int p){
	for(int i=2;i<=(int)(sqrt(p));i++){
		if(p%i==0){
			return false;
			exit(0);
		}
	}
	return true;
}

int yakusuu_kazu(int p){
	int ret = 0;

	while (true) {
		if(p<=0){
			break;
		}
		for (i = 1; i <= n; i++) {
			if (p % i==0) {
			ret++;
		}
	}
	return ret;
}

int main(void){
	int n;
	cin >> n;
	if( n%2==0 || is_prime(n)==true){
		cout << 0 << endl;
		exit(0);
	}

	int counter = 0;
	for(int i=1;i<=n;i=i+2){
		//1からnまでloopして約数を数える
		if(yakusuu_kazu(n)==8){
			count++;
		}
	}

	cout << count << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int yakusuu_kazu(int)':
a.cc:27:22: error: 'i' was not declared in this scope
   27 |                 for (i = 1; i <= n; i++) {
      |                      ^
a.cc:27:34: error: 'n' was not declared in this scope
   27 |                 for (i = 1; i <= n; i++) {
      |                                  ^
a.cc:35:15: error: a function-definition is not allowed here before '{' token
   35 | int main(void){
      |               ^
a.cc:54:2: error: expected '}' at end of input
   54 | }
      |  ^
a.cc:20:24: note: to match this '{'
   20 | int yakusuu_kazu(int p){
      |                        ^
a.cc:54:2: warning: control reaches end of non-void function [-Wreturn-type]
   54 | }
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll mod=1000000007;


int main(){
  int n;cin>>n;
  else if(n>=105)cout<<1<<endl;
  else cout<<0<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else if(n>=105)cout<<1<<endl;
      |   ^~~~
Language: C++

//
//  main.cpp
//  at
//
//  Created by 黄道煜 on 2018/8/18.
//  Copyright © 2018年 黄道煜. All rights reserved.
//

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

int main()
{
    scanf("%d\n", &n);
    if(n<105) printf("0\n");
    else if(n<165)printf("1\n");
    else printf("2\n");
                     
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: 'n' was not declared in this scope
   15 |     scanf("%d\n", &n);
      |                    ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
    int x;
    cin >> x;
    int eight[] = {105, 165, 195, 135, 189};

    int ans = 0;
    for(int a = 0; a < 5; a++){
        if(eight[a] <= x) ans+;
    }
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: expected primary-expression before ';' token
   12 |         if(eight[a] <= x) ans+;
      |                               ^
Language: C++

#include <stdio.h>
int main(){
  int n;
  scanf("%d\n", );
  if (n<105) {
    puts("0");
  } else if (n < 135) {
    puts("1");
  } else {
    puts("2");
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: expected primary-expression before ')' token
    4 |   scanf("%d\n", );
      |                 ^
Language: C++

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define pii pair<int,int>
#define pll pair<long long, long long>
#define rep(i,l,r) for(int i = l;i<r;i++)

#define SSTR( x ) static_cast< std::ostringstream & >( \
        ( std::ostringstream() << std::dec << x ) ).str()

#define fastout  ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
using namespace __gnu_pbds;

typedef tree<pll,null_type,less<pll>,rb_tree_tag,tree_order_statistics_node_update> order_set;

const int INF = (int)1e9 + 7;
const long long LLINF = (long long)1e18 + 7;

int main() {
    vector<int> cc = {105, 135, 189, 165, 195};
    int n;
    cin >> n;
    int ans = 0;
    for (auto it: cc) {
        if (it <= n) {
            ans++=;
        }
    }
    cout << ans;
}


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

#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;
using ll=long long;
using ld=long double;
using P=pair<ll,ll>;
#define FOR(i,n,m) for(ll i=n; i<(ll)m;i++)
#define FORr(i,n,m) for(ll i=n; i>(ll)m; i--)
#define FORm(i,m) for(auto i=m.begin();i!=m.end();i++)
#define cinv(v,n,m) FOR(i,n,m) cin>>v.at(i)
#define coutv(v,n,m) FOR(i,n,m) cout<<v.at(i) <<" "
#define cout(n) cout<<fixed<<setprecision(n)
int main(){
  int N;
  cin>>N;
  res=0;
  if(N<105)res=0;
  else if(N<135)res=1;
  else if(N<165)res=2;
  else if(N<189)res=3;
  else if(N<195)res=4;
  else res=5;
  cout<<res<<endl;
}


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

#include<cstdio>
using namespace std;

int main(){
  int n,cnt,cnt1;
  cnt=cnt1=0;
  scanf("%d",&n);
  for(int i=1;i<=n;i+=2){
    cnt1=0;
    for(j=1;j<=i;j++)
      if(i%j==0)
        cnt1++;
    if(cnt1==8)
      cnt++;
  }
  printf("%d\n",cnt);
}

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

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

typedef long long ll;
typedef pair<ll,ll> P;

const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const ll INF = 1LL<<29;
const ll mod = 1e9+7;

#define rep(i, a, b) for(ll (i) = (a); (i) < (b);++i)

int isPrime() 

int main()
{
  ll N;
  cin >> N;
  // ll A = {105, 135, 189};
  if (N < 105) {
    cout << 0 << endl;
  }else if (N < 135) {
    cout << 1 << endl;
  }else if (N < 189) {
    cout << 2 << endl;
  }else {
    cout << 3 << endl;
  }
  return 0;
}


Compiler output:
a.cc:16:1: error: expected initializer before 'int'
   16 | int main()
      | ^~~
Language: C++

#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<bitset>
using namespace std;
//#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
typedef long long int ll;
int main(){
	
	int n;
	cin>>n;
	int co2=0;
	for(int i=1;i<=n;i++){
	    int co=0;
	    if(i%2==0)continue;
	    for(int j=1;j<=i;j++){
	        if(i%j==0)co++;
	    }
	    if(co==8)co2++;
	}
	cout<<co2<<endl;
	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'cin' was not declared in this scope
   29 |         cin>>n;
      |         ^~~
a.cc:14:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   13 | #include<bitset>
  +++ |+#include <iostream>
   14 | using namespace std;
a.cc:39:9: error: 'cout' was not declared in this scope
   39 |         cout<<co2<<endl;
      |         ^~~~
a.cc:39:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:20: error: 'endl' was not declared in this scope
   39 |         cout<<co2<<endl;
      |                    ^~~~
a.cc:14:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
   13 | #include<bitset>
  +++ |+#include <ostream>
   14 | using namespace std;
Language: C++

include <iostream>
using namespace std;
int main(){
	int a,b;
	cin>>a;
	if(a>=105)cout<<1;
	else cout<<0;
//	cout<<(a-1)*(b-1);
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope
    5 |         cin>>a;
      |         ^~~
a.cc:6:19: error: 'cout' was not declared in this scope
    6 |         if(a>=105)cout<<1;
      |                   ^~~~
a.cc:7:14: error: 'cout' was not declared in this scope
    7 |         else cout<<0;
      |              ^~~~
Language: C++

n = int(input())
if n < 105:
    print(0)
else:
    ans = 0
    for i in range(105, n + 1):
        cnt = 0
        for j in range(1, i + 1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
    print(ans)


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <wchar.h>
#include <math.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define ABSS(a, b) ((a) > (b) ? (a) - (b) : (b) - (a))

int compare_f(const void *a, const void *b) {
	return *((size_t *)a) > *((size_t *)b) ? -1 : 1;
}

static size_t comb(const size_t n, const size_t r) {
	size_t result = 1;

	for (size_t i = 0; i < r; i++) {
		result *= n - i;
		result /= i + 1;
	}

	return result;
}

static size_t countDivisors(const size_t n)
{
	size_t count = 1;

	for (size_t i = 2; i <= n; i++) {
		if (n%i == 0) {
			count++;
		}
	}

	return count;
}

int main(void) {
	size_t N;

	scanf("%zu", &N);

	size_t count = 0;

	for (size_t i = 1; i <= N; i++) {
		if (countDvisors(i) == 7) {
			count++;
		}
	}

	printf("%zu\n", count);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:51:21: error: implicit declaration of function 'countDvisors'; did you mean 'countDivisors'? [-Wimplicit-function-declaration]
   51 |                 if (countDvisors(i) == 7) {
      |                     ^~~~~~~~~~~~
      |                     countDivisors
Language: Java

import java.util.*;


public class Main {
    public static void main(String[] args) {
        // 自分の得意な言語で
        // Let's チャレンジ！！
	int[]a={105,135,165,189}
        Scanner sc = new Scanner(System.in);
        int line = sc.nextInt();
      int an=0;
      for(int i=0;a[i]<=line;i++){
      	an++;
      }
        System.out.println(an);
    }
}

Compiler output:
Main.java:8: error: ';' expected
	int[]a={105,135,165,189}
	                        ^
1 error
Language: C++

using namespace std;

int main() {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  int64_t n;
  std::cin >> n;
  int ret = 0;
  for (int a = 1; a <= n; a += 2) {
    int cnt = 0;
    for (int i = 1; i <= a; i++) {
      if (a % i == 0) {
        cnt++;
      }
    }
    if (cnt == 8) {
      ret++;
    }
  }
  std::cout << ret << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: 'cin' is not a member of 'std'
    4 |   std::cin.tie(nullptr);
      |        ^~~
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:5:8: error: 'std::ios' has not been declared
    5 |   std::ios::sync_with_stdio(false);
      |        ^~~
a.cc:6:3: error: 'int64_t' was not declared in this scope
    6 |   int64_t n;
      |   ^~~~~~~
a.cc:1:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
  +++ |+#include <cstdint>
    1 | using namespace std;
a.cc:7:8: error: 'cin' is not a member of 'std'
    7 |   std::cin >> n;
      |        ^~~
a.cc:7:8: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:15: error: 'n' was not declared in this scope
    7 |   std::cin >> n;
      |               ^
a.cc:20:8: error: 'cout' is not a member of 'std'
   20 |   std::cout << ret << std::endl;
      |        ^~~~
a.cc:20:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:20:28: error: 'endl' is not a member of 'std'
   20 |   std::cout << ret << std::endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

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

int main(){
  string s;
  int k,count=0;
  cin >> s >> k;
  rep(i,n){
    if(s[i]==1) count++
    if(s[i]!=1) break;
  }
  
  if(k>count){
    rep(i,100){
      if(s[i]!=1) cout << s[i] << endl;
      return 0;
    }
  }
  
  if(k<=count) cout << 1 << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'n' was not declared in this scope
   10 |   rep(i,n){
      |         ^
a.cc:2:34: note: in definition of macro 'rep'
    2 | #define rep(i,n) for(int i=0; i<(n); i++)
      |                                  ^
a.cc:11:24: error: expected ';' before 'if'
   11 |     if(s[i]==1) count++
      |                        ^
      |                        ;
   12 |     if(s[i]!=1) break;
      |     ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
    string S;
    cin>>S;
    int K;
    cin>>K;
    bool ans=false;
    rep(i,S.size()){
        if(S[i]!=1){
            cout<<S[i]<<endl;
            ans=true;
            break:
        }
    }
    if(ans==false){
        cout<<1<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: expected ';' before ':' token
   16 |             break:
      |                  ^
      |                  ;
a.cc:16:18: error: expected primary-expression before ':' token
Language: C++

#include<iostream>
#include <vector>

using namespace std;

int main()
{
	string str;
	long double Num;
	cin >> str;
	cin >> Num;
	
	int intStrNum = str.size();

	for (int i = 0;i < intStrNum;i++)
	{
		if (str[i] == '1')
		{
			Num--;
			continue;
		}

		long double intNum = str[i];
		long double nnnnnn = pow(intNum, 5*10e15);

		if (nnnnnn >= Num)
		{
			cout << str[i] << endl;
			return 0;
		}
		else
		{
			Num = Num - nnnnnn;
		}

	}

	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:38: error: 'pow' was not declared in this scope
   24 |                 long double nnnnnn = pow(intNum, 5*10e15);
      |                                      ^~~
Language: C++

#include<iostream>
#include <vector>

using namespace std;

int main()
{
	string str;
	double Num;
	cin >> str;
	cin >> Num;
	
	int intStrNum = str.size();

	for (int i = 0;i < intStrNum;i++)
	{
		if (str[i] == '1')
		{
			Num--;
			continue;
		}

		long long intNum = str[i];
		long double nnnnnn = pow(intNum, 5*10e15);

		if (nnnnnn >= Num)
		{
			cout << str[i] << endl;
			return 0;
		}
		else
		{
			Num = Num - nnnnnn;
		}

	}

	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:38: error: 'pow' was not declared in this scope
   24 |                 long double nnnnnn = pow(intNum, 5*10e15);
      |                                      ^~~
Language: C++

#include<iostream>
#include <vector>

using namespace std;

int main()
{
	string str;
	double Num;
	cin >> str;
	cin >> Num;
	
	int intStrNum = str.size();
	char c;

	for (int i = 0;i < intStrNum;i++)
	{
		if (str[i] == '1')
		{
			Num--;
			continue;
		}

		long long intNum = str[i];
		long double nnnnnn = pow(intNum, 5*10e15);

		if (nnnnnn >= Num)
		{
			cout << str[i] << endl;
			return 0;
		}
		else
		{
			Num = Num - nnnnnn;
		}

		c = str[i];
	}

	cout << c << endl;

	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:38: error: 'pow' was not declared in this scope
   25 |                 long double nnnnnn = pow(intNum, 5*10e15);
      |                                      ^~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  string S;
  int K;

  cin >> S;
  cin >> K;

  REP(i, S.length) {
    if(S[i] != '1') {
      cout << S[i];
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:12: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |   REP(i, S.length) {
      |          ~~^~~~~~
a.cc:2:38: note: in definition of macro 'REP'
    2 | #define REP(i, n) for(int i = 0; i < n; i++)
      |                                      ^
Language: C++

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

int main(){
  string s;
  long long n;
  cin >> s >> n;
  flag = true;
  char ans;
  for(int i = 0; i < n; i++){
    if(s[i] != '1') {flag = false; ans = s[i]; break;}
  }
  if(flag) cout << 1 << endl;
  else cout << ans << endl;
}

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

#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i,n) for(int i=0, i##_len=(int)(n); i<i##_len; i++)
#define reps(i,n) for(int i=1 , i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;i--)
#define rreps(i,n) for(int i=((int)(n));i>0;i--)
#define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
string solve(bool a) { return ((a) ? "Yes" : "No"); }
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int , int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long , long long> P;
typedef vector<P> VP;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;}
template <class T, class U>ostream& operator<<(ostream& os, const pair<T, U>& p) {
	os << "(" << p.first << "," << p.second << ")";
	return os;
}
template <class T>ostream& operator<<(ostream& os, const vector<T>& v) {
	os << "{";
	rep(i, v.size()) {
		if (i) os << ",";
		os << v[i];
	}
	os << "}";
	return os;
}
template <class T, class U>istream& operator>>(istream& is, pair<T, U>& p) {
	is >> p.first >>p.second ;
	return is;
}
template <class T>istream& operator>>(istream& is,  vector<T>& v) {
	rep(i, v.size()) {
		is >> v[i];
	}
	return is;
}
const long long INFLL = 1LL<<60;
const int INF = 1<<30;
const double PI=acos(-1);
int main(){
	string s;
	ll k;
	char ans=1;
	cin >>s>>k;
	for (ll i = 0; i < k;i++){
		if(s[i]!='1'){
			cout << s[i] << endl;
			return 0;
		}
	} cout << 1<< endl;
}

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>
#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() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);

    string s;
    ll k;
    cin >> s >> k;
    rep(i, min(s.size(), k)) {
      if(s[i] >= '2') {
        cout << s[i] << endl;
        return 0;
      }
    }
    cout << 1 << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: no matching function for call to 'min(std::__cxx11::basic_string<char>::size_type, ll&)'
   14 |     rep(i, min(s.size(), k)) {
      |            ~~~^~~~~~~~~~~~~
a.cc:2:44: note: in definition of macro 'rep'
    2 | #define rep(i, n) for(int i = 0; i < (int)(n); ++i)
      |                                            ^
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:14:15: note:   deduced conflicting types for parameter 'const _Tp' ('long unsigned int' and 'll' {aka 'long long int'})
   14 |     rep(i, min(s.size(), k)) {
      |            ~~~^~~~~~~~~~~~~
a.cc:2:44: note: in definition of macro 'rep'
    2 | #define rep(i, n) for(int i = 0; i < (int)(n); ++i)
      |                                            ^
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:14:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long unsigned int'
   14 |     rep(i, min(s.size(), k)) {
      |            ~~~^~~~~~~~~~~~~
a.cc:2:44: note: in definition of macro 'rep'
    2 | #define rep(i, n) for(int i = 0; i < (int)(n); ++i)
      |                                            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;cin>>s;
  char res;
  int cnt=0;
  for(auto& val:s){
    ++cnt;
    if(cnt==k){
      res=val;
      break;
    }
    if(val!='1'){
      res=val;
      break;
    }
  }
  cout<<res<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'k' was not declared in this scope
    9 |     if(cnt==k){
      |             ^
Language: Java

#include "stdio.h"

int main(){
    char l[101];
    scanf("%s%ld",l);
    for(int i=0;i<100;i++){
        if(l[i]!='1'){
            printf("%c\n",l[i]);
            return 0;
        }
    }
    printf("1\n");
    return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include "stdio.h"
^
Main.java:1: error: class, interface, enum, or record expected
#include "stdio.h"
         ^
Main.java:5: error: class, interface, enum, or record expected
    scanf("%s%ld",l);
    ^
Main.java:6: error: class, interface, enum, or record expected
    for(int i=0;i<100;i++){
    ^
Main.java:6: error: class, interface, enum, or record expected
    for(int i=0;i<100;i++){
                ^
Main.java:6: error: class, interface, enum, or record expected
    for(int i=0;i<100;i++){
                      ^
Main.java:9: error: class, interface, enum, or record expected
            return 0;
            ^
Main.java:10: error: class, interface, enum, or record expected
        }
        ^
Main.java:13: error: class, interface, enum, or record expected
    return 0;
    ^
Main.java:14: error: class, interface, enum, or record expected
}
^
10 errors
Language: Java

import java.util.Scanner;

public class Solution {

  public static void main(String[] args) {
    // TODO Auto-generated method stub

    Scanner sc = new Scanner(System.in);
    String S = sc.nextLine();
    long K = sc.nextLong();
    
    for(int i = 0; i < K; i++){
      if(S.charAt(i) != '1'){
        System.out.println(S.charAt(i));
        break;
      }
      else if(i == K-1){
        System.out.println("1"); 
      }
    }  
  }
}


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

import java.util.*;
public class Main{
	public static final Scanner sc = new Scanner(System.io);
  	public static void main(String[] arg){
		String s = sc.next();
		int k = sc.nextInt();
        char c;
        char ans = '1';
        for (int i = 0; i<s.length(); i++){
        	c = s.charAt(i);
            if (ans != c){
            	ans = c;
                break;
            }
            k--;
            if (k==0){
            	break;
            }
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static final Scanner sc = new Scanner(System.io);
	                                                   ^
  symbol:   variable io
  location: class System
1 error
Language: Java

import java.util.*;
public class Main(){
	public static final Scanner sc = new Scanner(System.io);
  	public static void main(String[] arg){
		String s = sc.next();
		int k = sc.nextInt();
        char c;
        char ans = '1';
        for (int i = 0; i<s.length(); i++){
        	c = s.charAt(i);
            if (ans != c){
            	ans = c;
                break;
            }
            k--;
            if (k==0){
            	break;
            }
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:2: error: '{' expected
public class Main(){
                 ^
1 error
Language: Java

import java.util.*;
public class Main(){
	public static final Scanner sc = new Scanner(System.io);
  	public static main(String[] arg){
		String s = sc.next();
		int k = sc.nextInt();
        char c;
        char ans = '1';
        for (int i = 0; i<s.length(); i++){
        	c = s.charAt(i);
            if (ans != c){
            	ans = c;
                break;
            }
            k--;
            if (k==0){
            	break;
            }
        }
        System.out.println(qns)
    }
}

Compiler output:
Main.java:2: error: '{' expected
public class Main(){
                 ^
Main.java:4: error: invalid method declaration; return type required
  	public static main(String[] arg){
  	              ^
Main.java:20: error: ';' expected
        System.out.println(qns)
                               ^
3 errors
Language: Java

import java.util.*
public class Main(){
	public static final Scanner sc = new Scanner(System.io);
  	public static main(String[] arg){
		String s = sc.next();
		int k = sc.nextInt();
        char c;
        char ans = '1';
        for (int i = 0; i<s.length(); i++){
        	c = s.charAt(i);
            if (ans != c){
            	ans = c;
                break;
            }
            k--;
            if (k==0){
            	break;
            }
        }
        System.out.println(ans);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:2: error: '{' expected
public class Main(){
                 ^
Main.java:4: error: invalid method declaration; return type required
  	public static main(String[] arg){
  	              ^
3 errors
Language: Java

import java.util.*;
 
public class Main{
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);

    String S = sc.next();
    long K = sc.nextLong();
    int temp = 0;
    for (int i=0;i<S.length();i++){
        if (S.charAt(i) != '1'){
            temp = i;
            break;
        }
    }

    if (K < temp+1){
        System.out.println(1);
    }
    else{
        System.out.println(a.charAt(temp));
    }
  }
}

Compiler output:
Main.java:21: error: cannot find symbol
        System.out.println(a.charAt(temp));
                           ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  long long K;
  char Y;
  bool M=false;
  cin>>S>>K;
  for(long long X=0;X<K;X++){
    if(S.at(X)!='1'){
      Y=S.at(X);
      M=true;
      break;
    }
  }
  if(L==false){
    cout<<1<<endl;
  }
  else{
    cout<<Y<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:6: error: 'L' was not declared in this scope
   17 |   if(L==false){
      |      ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  long long K;
  char Y;
  bool M=false;
  cin>>S>>K;
  for(long long X=0;X<K;X++){
    if(S.at(X)!='1'){
      Y=S.at(X);
      L=true;
      break;
    }
  }
  if(L==false){
    cout<<1<<endl;
  }
  else{
    cout<<Y<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'L' was not declared in this scope
   13 |       L=true;
      |       ^
a.cc:17:6: error: 'L' was not declared in this scope
   17 |   if(L==false){
      |      ^
Language: C++

#include<iostream>
#include<cstring>
using namespace std;
int main(){
  string s;
  cin>>s;
  long long  k;cin>>k;
  for(int i=0;i<min((long,long)(s.length()),k);i++){
    if(s[i]>='2'){
      cout<<s[i];
      return 0;}
    cout<<1;
    return 0;
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected primary-expression before 'long'
    8 |   for(int i=0;i<min((long,long)(s.length()),k);i++){
      |                      ^~~~
a.cc:8:22: error: expected ')' before 'long'
    8 |   for(int i=0;i<min((long,long)(s.length()),k);i++){
      |                     ~^~~~
      |                      )
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  bool L=false;
  long long K;
  cin>>S>>K;
  for(int X=0;X<K;X++){
    if(S.at(X)!='1'){
      cout<<S.at(X);
      L=true;
      break;
    }
  }
  if(F==false){
    cout<<1<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: 'F' was not declared in this scope
   16 |   if(F==false){
      |      ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <vector> 
#include <math.h> 
#include <regex>

using namespace std;
int main(void){
    string S; int K;
    cin >> S >> K;
    smatch match;
    if (regex_search(S.substr(0,K), match, regex("[2-9]"))) {
        cout << match.str() << endl;
    } else {
        cout << 1 << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: use of deleted function 'bool std::regex_search(const __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&, __cxx11::match_results<typename __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>::const_iterator, _Alloc>&, const __cxx11::basic_regex<_Ch_type, _Rx_traits>&, regex_constants::match_flag_type) [with _Ch_traits = char_traits<char>; _Ch_alloc = allocator<char>; _Alloc = allocator<__cxx11::sub_match<__gnu_cxx::__normal_iterator<const char*, __cxx11::basic_string<char> > > >; _Ch_type = char; _Rx_traits = __cxx11::regex_traits<char>; typename __cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>::const_iterator = __cxx11::basic_string<char>::const_iterator]'
   12 |     if (regex_search(S.substr(0,K), match, regex("[2-9]"))) {
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/regex:68,
                 from a.cc:5:
/usr/include/c++/14/bits/regex.h:2540:5: note: declared here
 2540 |     regex_search(const basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&&,
      |     ^~~~~~~~~~~~
a.cc:12:21: note: use '-fdiagnostics-all-candidates' to display considered candidates
   12 |     if (regex_search(S.substr(0,K), match, regex("[2-9]"))) {
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;
int main(void){
    string s;
    long long k;
    cin >> s;
    cin >> k;
    
    long t = 0;
    char c = '1';
    for(long i = 0;i < s.size();i++){
          if(s[i] == '1'){
                t++;
          }else{
                c = s[i];
                break;
          }
    }
    if(t => k){
          cout << '1' << endl;
    }else{
          cout << c << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: expected primary-expression before '>' token
   20 |     if(t => k){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
  	string S; long long K;
	cin >> S >> K;
	for (int i = 0; i < min((long long)S.size(), K); i++) {
		if (S[i] >= '2') { cout << S[i] << endl; return 0; }
	}
	cout << '1' << endl;
	return 0;
}










}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  string s; cin >> s;
  ll n; cin >> n;
  if (n == 1) cout << s.at(0) << endl;
  else {
    rep(i, s.size()) {
      if (s.at(i) != '1') {
        cout << s.at(i) << endl;
        break;
      }
    }
  }

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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;

static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const ll INF = 1023456789;

#define REP(i,n)	for(int i=0;i<n;++i)
#define REPR(i,n)	for(int i=n-1;i>=0;--i)
#define FOR(i,s,n)	for(int i=s;i<n;++i)
#define FORR(i,s,n)	for(int i=n-1;i>=s;--i)
#define ALL(c)		(c).begin(),(c).end()
#define CLEAR(v)	memset(v,0,sizeof(v))
#define MP(a,b)		make_pair((a),(b))
#define ABS(a)		((a)>0?(a):-(a))
#define F			first
#define S			second

int main(int argc, char **argv) {
	string s;
	ll k;
	cin >> s >> k;
	k = min(k, s.length());
	REP(i, k) if (s[i] != '1') {
		cout << s[i] << endl;
		return 0;
	}
	cout << '1' << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:29:16: error: no matching function for call to 'min(ll&, std::__cxx11::basic_string<char>::size_type)'
   29 |         k = min(k, s.length());
      |             ~~~^~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:29:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   29 |         k = min(k, s.length());
      |             ~~~^~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:29:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   29 |         k = min(k, s.length());
      |             ~~~^~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define rep(i,n)  for(ll i=0; i<n; i++)
#define vi vector<int>
#define all(x) (x).begin(),(x).end()
#define INF 1e9
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int main(){
  string s; cin >> s;
  ll k; cin >> k;
  int num = min(k,s.size());
  rep(i,num) if('2' <= s[i]){
    cout << s[i];
    return 0;
  }
  cout << 1;
  cout << "\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: no matching function for call to 'min(ll&, std::__cxx11::basic_string<char>::size_type)'
   14 |   int num = min(k,s.size());
      |             ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:14:16: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'})
   14 |   int num = min(k,s.size());
      |             ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:14:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   14 |   int num = min(k,s.size());
      |             ~~~^~~~~~~~~~~~