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

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


Compiler output:
main.c: In function 'main':
main.c:12:6: error: lvalue required as left operand of assignment
   12 | 753-c=d;
      |      ^
main.c:14:6: error: lvalue required as left operand of assignment
   14 | c-753=d;
      |      ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:26: error: lvalue required as left operand of assignment
    7 | a[i]*100+a[i+1]*10+a[i+2]=b;
      |                          ^
main.c:12:6: error: lvalue required as left operand of assignment
   12 | 753-c=d;
      |      ^
main.c:14:6: error: lvalue required as left operand of assignment
   14 | c-753=d;
      |      ^
Language: C++

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

int main(){
  string s;
  cin>>s;
  int ans=753;
  for(int i=0;i<s.size-2;i++){
    string ss='';
    ss+=s[i];
    ss+=s[i+1];
    ss+=s[i+2];
    int dis=(int)ss;
    dis=abs(753-ans);
    if(ans>dis)ans=dis;
  }
  cout<<ans<<endl;
} 

Compiler output:
a.cc:11:15: error: empty character constant
   11 |     string ss='';
      |               ^~
a.cc: In function 'int main()':
a.cc:10:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   10 |   for(int i=0;i<s.size-2;i++){
      |                 ~~^~~~
      |                       ()
a.cc:11:15: error: conversion from 'char' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   11 |     string ss='';
      |               ^~
a.cc:15:13: error: invalid cast from type 'std::string' {aka 'std::__cxx11::basic_string<char>'} to type 'int'
   15 |     int dis=(int)ss;
      |             ^~~~~~~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:24: error: lvalue required as left operand of assignment
    7 | a[i]*100+a[i+1]*10+a[i]=b;
      |                        ^
main.c:12:6: error: lvalue required as left operand of assignment
   12 | 753-c=d;
      |      ^
main.c:14:6: error: lvalue required as left operand of assignment
   14 | c-753=d;
      |      ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:7:24: error: lvalue required as left operand of assignment
    7 | a[i]*100+a[i+1]*10+a[i]=b;
      |                        ^
main.c:12:6: error: lvalue required as left operand of assignment
   12 | 753-c=d;
      |      ^
main.c:14:6: error: lvalue required as left operand of assignment
   14 | c-753=d;
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int b;
int c[100];
int ams(int a){
    int tmp1=1;
    int i=0;
    while(0){
      if(double(a)/double(tmp1)>1){
        a=a/tmp;
        c[i]=a%10;
        tmp1=tmp1*10;
        i++;
      }
      else{
        return i;
      }
    }
  }
int main(){
  cin >> b;
  int size=ams(b)+1;
  int tmp;
  int ans;
  int sa=10000;
  for(int i=0;i!=size-2;i++){
    tmp=c[i]*100+c[i+1]*10+c[i+2];
    int a=abs(tmp-753);
    if(sa>a){
      sa=a;
    }
  }
  cout << sa << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int ams(int)':
a.cc:10:13: error: 'tmp' was not declared in this scope; did you mean 'tmp1'?
   10 |         a=a/tmp;
      |             ^~~
      |             tmp1
a.cc:19:3: warning: control reaches end of non-void function [-Wreturn-type]
   19 |   }
      |   ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:1: error: implicit declaration of function 'fot' [-Wimplicit-function-declaration]
    5 | fot(i=0;i<10;i++) scanf("%d",&a[i]);
      | ^~~
main.c:5:8: error: expected ')' before ';' token
    5 | fot(i=0;i<10;i++) scanf("%d",&a[i]);
      |    ~   ^
      |        )
main.c:5:18: error: expected ';' before 'scanf'
    5 | fot(i=0;i<10;i++) scanf("%d",&a[i]);
      |                  ^~~~~~
      |                  ;
main.c:6:8: error: expected ')' before ';' token
    6 | fot(i=0;i<10;i++){
      |    ~   ^
      |        )
main.c:6:18: error: expected ';' before '{' token
    6 | fot(i=0;i<10;i++){
      |                  ^
      |                  ;
main.c:13:1: error: 'else' without a previous 'if'
   13 | else if(c>753)
      | ^~~~
main.c:14:6: error: lvalue required as left operand of assignment
   14 | c-753=d;
      |      ^
Language: C

#include <stdio.h>
#include <string>
int main(void){
char a[10];
int b=0,c=0,d=0,i;
fot(i=0;i<10;i++) scanf("%d",&a[i]);
fot(i=0;i<10;i++){
a[i]*100+a[i+1]*10+a[i]=b;
if(c<b)
c=b;
}
if(c<753)
753-c=d;
else if(c>753)
c-753=d;
printf("%d",d);
return 0;
}


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

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

int main(void){
  int array[];
  int tmp,num,i,now,before;
  
  scanf("%d",array);
  num = sizeof array / sizeof array[0];
  for(i = 0;i < num-2;i++){
    now = array[i]*100 + array[i+1]*10 + array[i+2];
    if(before > abs(753 - now)){
    	tmp = now;
    }
    before = abs(753 - now);
  }
  printf("%d",tmp);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: array size missing in 'array'
    5 |   int array[];
      |       ^~~~~
Language: Java

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

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String x = sc.nextline();
	int l = x.length();
    int y[] = new int[l - 2];
    int c[] = new int[l - 2];
    for(int i = 0;i < l - 2;i++){
      y[i] = Integer.parseInt(x.substring(i,i+2));
    }
    
    int sichigo = 753;
    for(int i = 0;i < y.length;i++){
      c[i] = Math.abs(y[i] - sichigo);
    }
    
    int min = 1000;
    for(int i = 0; i < c.length;i++){
      min = Math.min(min,c[i]);
      System.out.println(min);
    }
  }
}

Compiler output:
Main.java:8: error: cannot find symbol
    String x = sc.nextline();
                 ^
  symbol:   method nextline()
  location: variable sc of type Scanner
1 error
Language: C

#include <stdio.h>

int main(void)
{
	int i=0, ch,a[10] = {0};

	while((ch = getchar()) != EOF){
		a[i] = ch - '0';
		i++;
	}
	int count = i-1, min = 900;

	for(i=0; i<count-2; i++){
		int num = a[i] * 100 + a[i+1] * 10 + a[i+2];
		int a = (753 > num) ? 753-num : num-753;
		if(min > a){
			min = a;
		}
	}
	printf("%d\n", min)
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:28: error: expected ';' before 'return'
   20 |         printf("%d\n", min)
      |                            ^
      |                            ;
   21 |         return 0;
      |         ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int b;
int c[11];
int ams(int a){
    int tmp1=10;
    int i=0;
    while(0){
      if(doubel(a)/double(tmp1)>1){
        c[i]=a%tmp1;
        tmp1=tmp1*10;
        i++;
      }
      else{
        return i;
      }
    }
  }
int main(){
  cin >> b;
  int size=ams(b)+1;
  int tmp;
  int ans;
  int sa=10000;
  for(int i=0;i!=size-2;i++){
    tmp=c[i]*100+c[i+1]*10+c[i+2];
    int a=abs(tmp-753);
    if(sa>a){
      sa=a;
    }
  }
  cout << sa << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int ams(int)':
a.cc:9:10: error: 'doubel' was not declared in this scope; did you mean 'double'?
    9 |       if(doubel(a)/double(tmp1)>1){
      |          ^~~~~~
      |          double
a.cc:18:3: warning: control reaches end of non-void function [-Wreturn-type]
   18 |   }
      |   ^
Language: Java

import java.util.*;
/**
 *
 * @author kouki
 */
public class Aim{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int numbers = sc.nextInt();
        int syujin=643;
        String numbers2 = String.valueOf(numbers);
        
        for (int i = 0; i < numbers2.length()-2; i++) {
            String runrun = "";
            runrun = numbers2.substring(i,i+3);
            //System.out.println(runrun);
            int runrun2 = Integer.parseInt(runrun);
            if (Math.abs(753-runrun2)<syujin) {
                syujin = Math.abs(753-runrun2);
            }
        }
        
        System.out.println(syujin);
    }
    
}

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

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

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String x = sc.nextInt();
	int l = x.length();
    int y[] = new int[l - 2];
    int c[] = new int[l - 2];
    for(int i = 0;i < l - 2;i++){
      y[i] = Integer.parseInt(x.substring(i,i+2));
    }
    
    int sichigo = 753;
    for(int i = 0;i < y.length;i++){
      c[i] = abs(y[i] - sichigo);
    }
    
    int min = 1000;
    for(int i = 0; i < c.length;i++){
      min = Math.min(min,c[i]);
      System.out.println(min);
    }
  }
}

Compiler output:
Main.java:8: error: incompatible types: int cannot be converted to String
    String x = sc.nextInt();
                         ^
Main.java:18: error: cannot find symbol
      c[i] = abs(y[i] - sichigo);
             ^
  symbol:   method abs(int)
  location: class Main
2 errors
Language: C

#include <stido.h>

int main(void)
{
	int i=0, ch,a[10] = {0};

	while((ch = getchar()) != EOF){
		a[i] = ch - '0';
		i++;
	}
	int count = i-1, min = 900;

	for(i=0; i<count-2; i++){
		int num = a[i] * 100 + a[i+1] * 10 + a[i+2];
		int a = (753 > num) ? 753-num : num-753;
		if(min > a){
			min = a;
		}
	}
	printf("%d\n", min)
	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main(){
	string x;
	cin >> x;
	int ans = 999999;
	ll num = atoi(x.c_str());
	int number[10];
	for(int i = 0; i < 10; i++){
		if(num%10)h++;
		number[i]=num%10;
		num/=10;
	}
	for(int i = 0; i < 8; i++){
		ans = min(ans,abs(753-number[i+2]*100-number[i+1]*10-number[i]));
	}
	cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: 'h' was not declared in this scope
   14 |                 if(num%10)h++;
      |                           ^
Language: C++

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

int main() {
	string S;
	cin >> S;
	int N;
	N = S.length();//文字の長さ

	int Ans = 10000;
	for (int i = 0; i < N - 2; i++) {
		string sub = S.substr(i, 3);
		int NS = stoi(sub);
		NS = abs(NS - 753);
		if (Ans > NS) {
			Ans = NS;
		}
	}

	cout <<a << Ans << endl;
}

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

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int change(string o){
  int num=stoi(o);
  return num;
}
int main(){
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num1=change(s[i+2]),num2=change(s[i+1]),num3=change(s[i]);
    int num=num1*100+num2*10+num3;
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: could not convert 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(i + 2)))' from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   13 |     int num1=change(s[i+2]),num2=change(s[i+1]),num3=change(s[i]);
      |              ~~~~~~^~~~~~~~
      |                    |
      |                    __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
a.cc:14:22: error: 'num2' was not declared in this scope; did you mean 'num'?
   14 |     int num=num1*100+num2*10+num3;
      |                      ^~~~
      |                      num
a.cc:14:30: error: 'num3' was not declared in this scope; did you mean 'num'?
   14 |     int num=num1*100+num2*10+num3;
      |                              ^~~~
      |                              num
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main() {
  char s[11]; cin >> s;
  int tmp = 0, ans = 1000;
  for(int i = 0; i < strlen(s) - 2; ++i) {
    tmp = ((int)s[i] - '0') * 100
      + ((int)s[i + 1] - '0') * 10
      + ((int)s[i + 2] - '0');
    if(ans > abs(tmp - 753))
      ans = abs(tmp - 753);
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: 'strlen' was not declared in this scope
    8 |   for(int i = 0; i < strlen(s) - 2; ++i) {
      |                      ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <cstdlib>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <string>
#include <stdio.h>
using namespace std;
int main(){
    int min=999, t1, t2;
  	string S;
  	cin >> S;
    N = S.size() - 2
    for(int i = 0; i < N; i++){
        t1 = stoi(S.substr(i,3)) - 753; 
        if(t1<0)t1= -t1;
        if(t1<min)min=t1;
    }
    cout << min << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'N' was not declared in this scope
    9 |     N = S.size() - 2
      |     ^
a.cc:10:20: error: 'i' was not declared in this scope
   10 |     for(int i = 0; i < N; i++){
      |                    ^
Language: C++

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num1=stoi(s[i+2]),num2=stoi(s[i+1]),num3=stoi(s[i]);
    int num=num1*100+num2*10+num3;
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
    9 |     int num1=stoi(s[i+2]),num2=stoi(s[i+1]),num3=stoi(s[i]);
      |              ~~~~^~~~~~~~
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:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:10:22: error: 'num2' was not declared in this scope; did you mean 'num'?
   10 |     int num=num1*100+num2*10+num3;
      |                      ^~~~
      |                      num
a.cc:10:30: error: 'num3' was not declared in this scope; did you mean 'num'?
   10 |     int num=num1*100+num2*10+num3;
      |                              ^~~~
      |                              num
Language: C++

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num1=stoi(s[i+2])*100,num2=stoi(s[i+1])*10,num3=stoi(s[i]);
    int num=num1+num2+num3;
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: no matching function for call to 'stoi(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
    9 |     int num1=stoi(s[i+2])*100,num2=stoi(s[i+1])*10,num3=stoi(s[i]);
      |              ~~~~^~~~~~~~
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:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:22: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::string&' {aka 'const std::__cxx11::basic_string<char>&'}
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~^~~~~
/usr/include/c++/14/bits/basic_string.h:4432:3: note: candidate: 'int std::__cxx11::stoi(const std::wstring&, std::size_t*, int)'
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
/usr/include/c++/14/bits/basic_string.h:4432:23: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::wstring&' {aka 'const std::__cxx11::basic_string<wchar_t>&'}
 4432 |   stoi(const wstring& __str, size_t* __idx = 0, int __base = 10)
      |        ~~~~~~~~~~~~~~~^~~~~
a.cc:10:18: error: 'num2' was not declared in this scope; did you mean 'num'?
   10 |     int num=num1+num2+num3;
      |                  ^~~~
      |                  num
a.cc:10:23: error: 'num3' was not declared in this scope; did you mean 'num'?
   10 |     int num=num1+num2+num3;
      |                       ^~~~
      |                       num
Language: C++

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
  char* c_str=str.c_str();
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   char* c_str=str.c_str();
      |               ^~~
      |               std
a.cc:10:25: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(i + 2)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   10 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                         ^~~~~
a.cc:10:50: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   10 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                                                  ^~~~~
a.cc:10:72: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
   10 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                                                                        ^~~~~
Language: C++

#include<iostream>
#include<string>
#include <cmath>
#include <cstdlib>
using namespace std;
int main(){
    string S;
    cin>>S;
    int min=10000000;
    for(int i=0;i<S.size()-2;i++){
        int X=(S[i]-'0')*100+(S[i+1]-'0')*10+(S[i+2]-'0');
        int diff = abs(X,753);
        if(diff<min)min=diff;
    }
    cout<<min<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: no matching function for call to 'abs(int&, int)'
   12 |         int diff = abs(X,753);
      |                    ~~~^~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
/usr/include/stdlib.h:980:12: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:137:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note:   candidate expects 1 argument, 2 provided
Language: C++

#include<bits/stdc++.h>

using namespace std;
  string S;
int main(){
  cin >> S;
  int size=S.size();
  int tmp;
  int ans;
  int sa=10000;
  for(int i=0;i!=size-2;i++){
    tmp=atoi(S[i])*100+atoi(S[i+1])*10+atoi(S[i+2]);
    int a=abs(tmp-753);
    if(sa>a){
      sa=a;
    }
  }
  cout << sa << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     tmp=atoi(S[i])*100+atoi(S[i+1])*10+atoi(S[i+2]);
      |         ~~~~^~~~~~
      |             |
      |             __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:12:28: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     tmp=atoi(S[i])*100+atoi(S[i+1])*10+atoi(S[i+2]);
      |                        ~~~~^~~~~~~~
      |                            |
      |                            __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:12:44: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
   12 |     tmp=atoi(S[i])*100+atoi(S[i+1])*10+atoi(S[i+2]);
      |                                        ~~~~^~~~~~~~
      |                                            |
      |                                            __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
 
using namespace std;
 
int main()
{
  string S;
  cin >> S;
  
  int value = 100000;
  for(int i=0; i<S.size()-2; ++i) {
    int n = (S[i] - '0');
    n = n*10 + (S[i+1] - '0');
    n = n*10 + (S[i+2] - '0');
    
    value = min(value, abs(753 - n));
  }
  
  cout << value << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'string' was not declared in this scope
   10 |   string S;
      |   ^~~~~~
a.cc:5:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    4 | #include <algorithm>
  +++ |+#include <string>
    5 | 
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> S;
      |   ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include <algorithm>
  +++ |+#include <iostream>
    5 | 
a.cc:11:10: error: 'S' was not declared in this scope
   11 |   cin >> S;
      |          ^
a.cc:22:3: error: 'cout' was not declared in this scope
   22 |   cout << value << endl;
      |   ^~~~
a.cc:22:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:22:20: error: 'endl' was not declared in this scope
   22 |   cout << value << endl;
      |                    ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include <algorithm>
  +++ |+#include <ostream>
    5 |
Language: Java

import java.util.Scanner;

public class B754 {
	public static final int number=753;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();

		int max=Integer.MAX_VALUE;
		for(int a = 0; a<=S.length()-3;a++) {
			int k = Integer.parseInt(S.substring(a, a+3));
			max=Math.min(max, Math.abs(k-number));
		}
		System.out.println(max);
	}

}


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

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(i + 2)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    9 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                         ^~~~~
a.cc:9:50: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)(i + 1)))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    9 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                                                  ^~~~~
a.cc:9:72: error: request for member 'c_str' in 's.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'}
    9 |     int num=atoi(s[i+2].c_str())*100+atoi(s[i+1].c_str())*10+atoi(s[i].c_str());
      |                                                                        ^~~~~
Language: C++

def main():
	import numpy as np
	min = -1
	s = input()
	n = len(s)
	for i in range(n-2):
		buf = int(s[i:i+3])
		bufmin = np.abs(buf-753)
		if(min == -1):
			min = bufmin
		else:
			if(bufmin < min):
				min = bufmin
	print(min)

main()# your code goes here

Compiler output:
a.cc:16:7: error: stray '#' in program
   16 | main()# your code goes here
      |       ^
a.cc:1:1: error: 'def' does not name a type
    1 | def main():
      | ^~~
Language: C++

#include "bits/stdc++.h"
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;
int main(){
  string s;
  cin>>s;
  int memo=100000;
  rep(i,0,s.size()-2){
    int num=atoi(s[i+2])*100+atoi(s[i+1])*10+atoi(s[i]);
    if(abs(num-753)<memo)memo=abs(num-753);
  }
  cout<<memo<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    9 |     int num=atoi(s[i+2])*100+atoi(s[i+1])*10+atoi(s[i]);
      |             ~~~~^~~~~~~~
      |                 |
      |                 __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:9:34: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    9 |     int num=atoi(s[i+2])*100+atoi(s[i+1])*10+atoi(s[i]);
      |                              ~~~~^~~~~~~~
      |                                  |
      |                                  __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:9:50: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
    9 |     int num=atoi(s[i+2])*100+atoi(s[i+1])*10+atoi(s[i]);
      |                                              ~~~~^~~~~~
      |                                                  |
      |                                                  __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C

#include<stdio.h>
#include<stdli.h>

int main(){
  int i=0,tmp,ans=2000000;
  char s[11];
  scanf("%s",s);
  while(s[i+2]!=0){
  tmp=(s[i]-'0')*100+(s[i+1]-'0')*10+s[i+2];
    if(ans>abs(753-tmp))ans=abs(753-tmp);
  }
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c:2:9: fatal error: stdli.h: No such file or directory
    2 | #include<stdli.h>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

#include"bits/stdc++.h"
using namespace std;
using ll = int64_t;

int main() {
    string S;
    cin >> S;
    ll ans = INT_MAX;
    for (ll i = 0; i < S.size() - 2; i++) {
        ans = min(ans, abs(753 - stoll(S.substr(i, 3))));
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: no matching function for call to 'min(ll&, long long int)'
   10 |         ans = min(ans, abs(753 - stoll(S.substr(i, 3))));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:10:18: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   10 |         ans = min(ans, abs(753 - stoll(S.substr(i, 3))));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:10:18: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   10 |         ans = min(ans, abs(753 - stoll(S.substr(i, 3))));
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

const int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
const int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;



int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	string s;
	cin >> s;
	int ans = 100000000;
	FOR(i, s.size() - 2) {
		string t = s.substr(i, 3);
		int a = stoi(t);
		ans = min(ans, abs(a - 753));
	}
	cout << ans << endl;
}

Compiler output:
a.cc:34:28: error: macro "FOR" requires 3 arguments, but only 2 given
   34 |         FOR(i, s.size() - 2) {
      |                            ^
a.cc:5:9: note: macro "FOR" defined here
    5 | #define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
      |         ^~~
a.cc: In function 'int main()':
a.cc:34:9: error: 'FOR' was not declared in this scope
   34 |         FOR(i, s.size() - 2) {
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int ans=0;
int kaage(int N,string S){
  bool A=false,B=false,C=false;
  for(int i=0;i<S.size();i++){
    if(S.at(i)=='3')A=true;
    if(S.at(i)=='5')B=true;
    if(S.at(i)=='7')C=true;
  }
  a=stoi(S);
  if(A&&B&&C&&N>=a)ans++;
  if(S.size()==9)return ans;
  kaage(N,S+"3");
  kaage(N,S+"5");
  kaage(N,S+"7");
}
int main(){
  int N;cin>>N;string S="";
  cout<<kaage(N,S)<<endl;
}

Compiler output:
a.cc: In function 'int kaage(int, std::string)':
a.cc:11:3: error: 'a' was not declared in this scope
   11 |   a=stoi(S);
      |   ^
a.cc:16:8: warning: control reaches end of non-void function [-Wreturn-type]
   16 |   kaage(N,S+"7");
      |   ~~~~~^~~~~~~~~
Language: Java

import lib.io.ExtendedScanner;
import lib.io.FastPrintStream;

public class Main {
    public static void main(String[] args) throws Exception {
        ExtendedScanner sc = new ExtendedScanner();
        FastPrintStream pw = new FastPrintStream();
        solve(sc, pw);
        sc.close();
        pw.flush();
        pw.close();
    }

    static int[] stack = new int[10];
    static int ptr = 0;
    static int n;

    public static void solve(ExtendedScanner sc, FastPrintStream pw) {
        n = sc.nextInt();
        pw.println(dfs());
    }

    public static int dfs() {
        if (ptr == 10) return 0;
        int s = 0;
        int sum = 0;
        boolean b7 = false, b5 = false, b3 = false;
        for (int i = ptr - 1; i >= 0; i--) {
            sum = sum * 10 + stack[i];
            b7 |= stack[i] == 7;
            b5 |= stack[i] == 5;
            b3 |= stack[i] == 3;
        }
        if (1 <= sum && sum <= n && b3 && b5 && b7) s++;
        stack[ptr++] = 7;
        s += dfs();
        --ptr;
        stack[ptr++] = 5;
        s += dfs();
        --ptr;
        stack[ptr++] = 3;
        s += dfs();
        --ptr;
        return s;
    }
}


Compiler output:
Main.java:1: error: package lib.io does not exist
import lib.io.ExtendedScanner;
             ^
Main.java:2: error: package lib.io does not exist
import lib.io.FastPrintStream;
             ^
Main.java:18: error: cannot find symbol
    public static void solve(ExtendedScanner sc, FastPrintStream pw) {
                             ^
  symbol:   class ExtendedScanner
  location: class Main
Main.java:18: error: cannot find symbol
    public static void solve(ExtendedScanner sc, FastPrintStream pw) {
                                                 ^
  symbol:   class FastPrintStream
  location: class Main
Main.java:6: error: cannot find symbol
        ExtendedScanner sc = new ExtendedScanner();
        ^
  symbol:   class ExtendedScanner
  location: class Main
Main.java:6: error: cannot find symbol
        ExtendedScanner sc = new ExtendedScanner();
                                 ^
  symbol:   class ExtendedScanner
  location: class Main
Main.java:7: error: cannot find symbol
        FastPrintStream pw = new FastPrintStream();
        ^
  symbol:   class FastPrintStream
  location: class Main
Main.java:7: error: cannot find symbol
        FastPrintStream pw = new FastPrintStream();
                                 ^
  symbol:   class FastPrintStream
  location: class Main
8 errors
Language: Java

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

public class Main {
 	public static void main(String args[]) throws IOException {
     	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      	int N = Integer.parseInt(br.readLine());
      	int ans = 0, i = 0;
      	while(i <= N) {
         	String tmp = "" + i;
          	boolean flag = true;
          	for(int j = 0;j<tmp.length();j++) {
             	char ch = tmp.charAt(j);
              	if(j != '7' && j != '5' && j != '3') {
                 	flag = false;
                  	break;
                }
            }
          	if(flag) 
              ans++;
        }
      	System.out.println(ans);
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.io*;
              ^
1 error
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<list>
#include<map>
#include<numeric>
#include<iomanip>
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define ll long long

using namespace std;

/*小数点以下の長さを指定
cout << fixed << setprecision(15) << y << endl;
*/

//最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
}

//最小公倍数
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}

vector<string>result;
ll N = 0;

void dfs(const int _left, string _s){
	if (_left == 0){
		result.emplace_back(_s);
		cout << _s << endl;
	}
	else{
		for (int i = 3; i <= 7; i += 2){
			dfs(_left - 1, _s + to_string(i));
		}
	}
}

int sieve(vector<string>_vs, const int &_n){
	int ans = 0;

	rep(i, _vs.size()){
		int n3 = false;
		int n5 = false;
		int n7 = false;
		if (stoi(_vs[i]) <= _n){
			if (_vs[])
			ans++;
		}
	}

	return ans;
}

int main() {
	cin >> N;
	int _N = N;

	int keta = 0;
	while (N != 0){
		N /= 10;
		keta++;
	}

	dfs(keta,"");
	
	int ans = sieve(result, _N);
	cout << ans << endl;
	cin >> N;
	return 0;
}

Compiler output:
a.cc: In function 'int sieve(std::vector<std::__cxx11::basic_string<char> >, const int&)':
a.cc:56:33: error: expected primary-expression before ']' token
   56 |                         if (_vs[])
      |                                 ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define printVec(v) printf("{"); for (const auto& i : v) { std::cout << i << ", "; } printf("}\n");
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; }
using namespace std;
using P = pair<int,int>;
using ll = long long;
const ll INF = 1LL<<60;
const double PI = 3.1415926535897932;
const int MOD = 1e9 + 7;

int n, size;
vector<string> ans;

void dfs(string a) {
  if (a.size() == size + 1) return;
  int seven, five,  three;
  five = 0; seven = 0; three = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '7') seven++;
    if (a[i] == '5') five++;
    if (a[i] == '3') three++;
  }
  if (seven != 0 && five != 0 && three != 0 && atoi(a.c_str()) <= n) {
    ans.push_back(a);
  }

  dfs(a + "7");
  dfs(a + "5");
  dfs(a + "3");
}

//cin.tie(0);ios::sync_with_stdio(false);
int main() {
  cin >> n;
  size = to_string(n).size();
  dfs("");

  cout << ans.size() << endl;

  //for (auto v : ans) {
  //  cout << v << endl;
  //}
  
  return 0;
}


Compiler output:
a.cc: In function 'void dfs(std::string)':
a.cc:17:19: error: reference to 'size' is ambiguous
   17 |   if (a.size() == size + 1) return;
      |                   ^~~~
In file included from /usr/include/c++/14/string:53,
                 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/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:13:8: note:                 'int size'
   13 | int n, size;
      |        ^~~~
a.cc: In function 'int main()':
a.cc:37:3: error: reference to 'size' is ambiguous
   37 |   size = to_string(n).size();
      |   ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:13:8: note:                 'int size'
   13 | int n, size;
      |        ^~~~
Language: C++

#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;
 
#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int sft(int N){
  int x=1;
  string S=N;
  int K=S.size();
  for(int i=0;i<K;i++){
    if(S[i]!='3' || S[i]!='5' || S[i]!='7') x*=0;
  }
  return x;}

int main(){
  vector<int> X(1000000011);
  X.at(0)=0;
  for(int i=1;i<1000000010;i++){
    if(sft(i)==1) X.at(i)=X.at(i-1)+1;
  }
  int N;
  cin>>N;
  cout<<X.at(N);
return 0;}


Compiler output:
a.cc: In function 'int sft(int)':
a.cc:50:12: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   50 |   string S=N;
      |            ^