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

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

int main{
  string S[10];
  cin >> S;
  
  int n =S.size();
  int x = 999;
  for(int i=0;i<N-3;i++){
    int w = (c[i] - "0") * 100 + (c[i+1] - "0") * 10 + (c[i+2] - "0");
    x = min(x, abs(w-753));
  }
  
  cout << x;
  
  return 0;
}

Compiler output:
a.cc:6:5: error: cannot declare '::main' to be a global variable
    6 | int main{
      |     ^~~~
a.cc:7:10: error: expected primary-expression before 'S'
    7 |   string S[10];
      |          ^
a.cc:7:10: error: expected '}' before 'S'
a.cc:6:9: note: to match this '{'
    6 | int main{
      |         ^
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin >> S;
      |   ^~~
a.cc:10:10: error: 'S' was not declared in this scope
   10 |   int n =S.size();
      |          ^
a.cc:12:3: error: expected unqualified-id before 'for'
   12 |   for(int i=0;i<N-3;i++){
      |   ^~~
a.cc:12:15: error: 'i' does not name a type
   12 |   for(int i=0;i<N-3;i++){
      |               ^
a.cc:12:21: error: 'i' does not name a type
   12 |   for(int i=0;i<N-3;i++){
      |                     ^
a.cc:17:3: error: 'cout' does not name a type
   17 |   cout << x;
      |   ^~~~
a.cc:19:3: error: expected unqualified-id before 'return'
   19 |   return 0;
      |   ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
  int a[10];
  int i,a=0,min=100000,m;
  
  for(i=0;i<10;i++){
    scanf("%d",&a[i]);
    a++;
  }
  
  for(i=0;i<a-3;i++){
    s=a[i]*100+a[i+1]*10+a[i+2];
    if(753<=s) m=s-753;
    if(753>s)  m=753-s;
    if(min>m) min=m;
  }
  
  return 0;
}

    

Compiler output:
main.c: In function 'main':
main.c:5:9: error: conflicting types for 'a'; have 'int'
    5 |   int i,a=0,min=100000,m;
      |         ^
main.c:4:7: note: previous declaration of 'a' with type 'int[10]'
    4 |   int a[10];
      |       ^
main.c:13:5: error: 's' undeclared (first use in this function)
   13 |     s=a[i]*100+a[i+1]*10+a[i+2];
      |     ^
main.c:13:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
#define INF 1000
int main()
{
  string str;
  cin >> str;
  
  int min = INF;
  for(int i = 0; i < str.size()-2; i++){
    string tmp = str.substr(i, i+2);
    int x = atoi(tmp);
    if(min > 753 - x)
      min = 753 - x;
  }
  cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:18: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 |     int x = atoi(tmp);
      |                  ^~~
      |                  |
      |                  std::string {aka std::__cxx11::basic_string<char>}
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:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
#define INF 1000
int main()
{
  String str;
  cin >> str;
  
  int min = INF;
  for(int i = 0; i < str.size()-2; i++){
    String tmp = str.substr(i, i+2);
    int x = atoi(tmp);
    if(min > 753 - x)
      min = 753 - x;
  }
  cout << min << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'String' was not declared in this scope
    8 |   String str;
      |   ^~~~~~
a.cc:9:10: error: 'str' was not declared in this scope; did you mean 'std'?
    9 |   cin >> str;
      |          ^~~
      |          std
a.cc:13:11: error: expected ';' before 'tmp'
   13 |     String tmp = str.substr(i, i+2);
      |           ^~~~
      |           ;
a.cc:14:18: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   14 |     int x = atoi(tmp);
      |                  ^~~
      |                  tm
Language: C++

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

int main(){
  string S;
	cin >> S;
	int res 1000;
	for(int i = 0;i < S.length() -2;i++){
		int a = stoi(S.substr(i,3));
		int kari = abs(753 - a);
		if(res > kari){
			res = kari;
		}
	}
	cout << res << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected initializer before numeric constant
    7 |         int res 1000;
      |                 ^~~~
a.cc:11:20: error: 'res' was not declared in this scope
   11 |                 if(res > kari){
      |                    ^~~
a.cc:15:17: error: 'res' was not declared in this scope
   15 |         cout << res << endl;
      |                 ^~~
Language: C++

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

using namespace std;

int main() {
	string s;
	cin >> s;

	int l = s.langth();
	int ans = 800;
	for (int i = 0; i < l - 2; i++) {
		int a = s[i] - '0';
		int b = s[i + 1] - '0';
		int c = s[i + 2] - '0';
		int x = a * 100 + b * 10 + c;
		min(ans, abs(x - 753));
	}
	cout << ans << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'langth'; did you mean 'length'?
   12 |         int l = s.langth();
      |                   ^~~~~~
      |                   length
a.cc:19:20: warning: ignoring return value of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |                 min(ans, abs(x - 753));
      |                 ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: declared here
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
Language: C++

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

int main()
{
  	int string s;
    cin >> s;
    
    int min_diff = INT_MAX;
    for(int i = 0; i < s.length() - 2; i++)
    {
        int three_num = std::stoi(s.substr(i, 3));
        int diff = abs(three_num - 753);
        if( diff < min_diff)
            min_diff = diff;
    }
    
    cout << min_diff;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: expected initializer before 's'
    7 |         int string s;
      |                    ^
a.cc:8:12: error: 's' was not declared in this scope
    8 |     cin >> s;
      |            ^
Language: C++

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main() {
  string s; cin >> s;
  int ans = 1000;
  for(int i = 0; i < sz(s) - 3; i++) {
    int cur = 0;
    for(int j = 0; j < 3; j++) cur = cur * 10 + s[i+j] - '0';
    if(ans > abs(cur - 753)) ans = abs(cur - 753);
  }
  cout << ans << endl;

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:10:22: error: 'sz' was not declared in this scope; did you mean 's'?
   10 |   for(int i = 0; i < sz(s) - 3; i++) {
      |                      ^~
      |                      s
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'n' undeclared (first use in this function)
    5 | for(i=0;n<i;i++){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:9: error: 'n' undeclared (first use in this function)
    5 | for(i=0;n<i;i++){
      |         ^
main.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:7: error: expected ';' before '}' token
   11 | b[i]=0
      |       ^
      |       ;
   12 | }
      | ~
Language: C++

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

int main(int argc, char *argv[]) {
  int a;
  int digits[10];
  int len = 0;
  int i;
  int min = 1000;
  
  scanf("%d",&a);

  while(a>0) {
    digits[len] = a%10;
    a /= 10;
    len++;
  }
  
  for(i=0;i<len-2;i++) {
    a = 100*digits[len-1-i] + 10*digits[len-2-i] + digits[len-3-i];
    if(abs(a-753)<min) min=abs(a-753);
  }

  printf("%d\n",min);
  
  return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | c#include <stdio.h>
      |  ^
a.cc:1:1: error: 'c' does not name a type
    1 | c#include <stdio.h>
      | ^
a.cc: In function 'int main(int, char**)':
a.cc:11:3: error: 'scanf' was not declared in this scope
   11 |   scanf("%d",&a);
      |   ^~~~~
a.cc:24:3: error: 'printf' was not declared in this scope
   24 |   printf("%d\n",min);
      |   ^~~~~~
a.cc:3:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    2 | #include <stdlib.h>
  +++ |+#include <cstdio>
    3 |
Language: Java

import java.util.*;

public class AtCoder {
    public static void main(String args[]){
        Scanner scan = new Scanner(System.in);
        String[] Str = scan.nextLine().split("");
        Integer[] S = new Integer[Str.length];

        for(int i=0; i<S.length; i++) {
            S[i] = Integer.parseInt(Str[i]);
        }

        int answer = 999;
        int absolute;
        for(int j=0; j<S.length-2; j++) {
            absolute = Math.abs(753 - (S[j]*100 + S[j+1]*10 + S[j+2]));
           if (absolute < answer) answer = absolute;
        }

        System.out.println(answer);
    }
}


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


#define _USE_MATH_DEFINES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>  
#include <stdbool.h>   
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define PI 3.14159265358979323846;
#define EPS 1e-10
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
/*
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r)
*/
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r)
#define TYPE long long
#define ll long long
#define MEMSET(a) memset(a,0,sizeof(a))
#define MEMSET_U(a) memset(a,-1,sizeof(a))
#define bool    _Bool
const int mod = (int)1e09 + 7;

//#define DEBUG1
//#define DEBUG2
//#define DEBUGF
#define DUMMY

int in(void) { int i; scanf("%d", &i); return i; }
long long llin(void) { long long i; scanf("%lld", &i); return i; }
double din(void) { double i; scanf("%lf", &i); return i; }
void chin(char s[]) { scanf("%s", s); }

void print(int a) { printf("%d\n", a); }
void llprint(long long a) { printf("%lld\n", a); }
void dprint(double a) { printf("%.10f\n", a); }
void print2(int a, int b) { printf("%d %d\n", a, b); }
int Max(int a, int b) { if (a > b) { return a; }return b; }
int Min(int a, int b) { if (a < b) { return a; }return b; }
long long llmax(long long a, long long b) { return a > b ? a : b; }
long long llmin(long long a, long long b) { return a < b ? a : b; }
double dmax(double a, double b) { return a > b ? a : b; }
double dmin(double a, double b) { return a < b ? a : b; }
//long long llmax(long long a, long long b) { return a > b ? a : b; }
//long long llmin(long long a, long long b) { return a < b ? a : b; }
//double dmax(double a, double b) { return a > b ? a : b; }
int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; }
int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; }
int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); }
int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); }
void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; }



int main() {

	char S[12];
	scanf("%s", S);
	//printf("%d", (S[0]-'0'));

	int tmp, min = 1000;
	int ans;
	for (int i = 0; i < strlen(S) - 2; i++) {
		tmp = 0;
		tmp += (S[i + 0] - '0') * 100;
		tmp += (S[i + 1] - '0') * 10;
		tmp += (S[i + 2] - '0') * 1;
		min = min(abs(753 - tmp),min);
	}
	ans = min;
	printf("%d\n", ans);

#ifdef DEBUGF
	getch();
#endif
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:73:23: error: called object 'min' is not a function or function pointer
   73 |                 min = min(abs(753 - tmp),min);
      |                       ^~~
main.c:66:18: note: declared here
   66 |         int tmp, min = 1000;
      |                  ^~~
Language: C++

#include <iostream>
using namespace std;
 
int main() {
  string s;
  cin >> s;
  int len = s.length();
  int x[len];
  for (int i = 0; i < len; ++i) {
    const char tmp = s[i];
    x[i] = atoi(&tmp);
   // printf("%d\n", x[i]);
  }
  
  int ans = 9999;
  for (int i = 0; i < len-2; ++i) {
    int y = 100 * x[i] + 10 * x[i+1] + x[i+2];
    if (y >= 753) {
      y = y - 753;
    } else {
      y = 753 - y
    }
    if (y < ans) {
      ans = y;
    }
  }
  printf("%d", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: expected ';' before '}' token
   21 |       y = 753 - y
      |                  ^
      |                  ;
   22 |     }
      |     ~
Language: C++

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

int main(){
  	string s;
  	cin >> s;
  	int memo,ans = 1e9;
  
  	rep(i,0,s.size()-2){
      	memo = 0;
     	rep(j,0,3){
        	memo += (int)(a[i] - '0')*pow(10,j);
        }
      	ans = min(ans,memo);
    }
  
  	cout << ans << endl;
  
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'a' was not declared in this scope
   15 |                 memo += (int)(a[i] - '0')*pow(10,j);
      |                               ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    string s;
    cin >> s;
    int min = 1000
    for(int i = 0;i<s.length()-2;i++)
    {   
        int a = 100*(s[i]-'0')+10*(s[i+1]-'0')+(s[i+2]-'0')-754;
        if(a<min)
        {
            min = a;
        }
    }

    printf("%d\n",min);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: expected ',' or ';' before 'for'
   10 |     for(int i = 0;i<s.length()-2;i++)
      |     ^~~
a.cc:10:19: error: 'i' was not declared in this scope
   10 |     for(int i = 0;i<s.length()-2;i++)
      |                   ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    char a[10];

    cin >> a;

    int len;
    len = strlen(a);
    int n[len];
    for(int i = 0;a[i+2] == '\0';i++)
    {
        n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
    }

    for(int i = strlen(a)-2;i>0;i--)
    {
        if(n[i]>n[i-1])
        {
            tmp = n[i];
            n[i] = n[i-1];
            n[i-1] = tmp;

        }
    }
    printf("%d\n",n[0]);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'strlen' was not declared in this scope
   12 |     len = strlen(a);
      |           ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:16:24: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                     ~~~^
      |                        |
      |                        char
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:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:16:41: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                    ~~~~~^
      |                                         |
      |                                         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:16:57: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                                    ~~~~~^
      |                                                         |
      |                                                         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:23:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   23 |             tmp = n[i];
      |             ^~~
      |             tm
Language: C++

#include <iostream>

using namespace std;

int main()
{
    char a;

    cin >> a;

    int n[a-2];
    for(int i = 0;i<n-2;i++)
    {
        n[i] = atoi(n[i])*100+atoi(n[i+1])*10+atoi(n[i+2]);
    }

    for(int i = n-2;i>0;i--)
    {
        if(n[i]>n[i-1])
        {
            tmp = n[i];
            n[i] = n[i-1];
            n[i-1] = tmp;

        }
    }
    printf("%d\n",n[0]);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     for(int i = 0;i<n-2;i++)
      |                   ~^~~~
a.cc:14:24: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(n[i])*100+atoi(n[i+1])*10+atoi(n[i+2]);
      |                     ~~~^
      |                        |
      |                        int
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:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:14:41: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(n[i])*100+atoi(n[i+1])*10+atoi(n[i+2]);
      |                                    ~~~~~^
      |                                         |
      |                                         int
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:14:57: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
   14 |         n[i] = atoi(n[i])*100+atoi(n[i+1])*10+atoi(n[i+2]);
      |                                                    ~~~~~^
      |                                                         |
      |                                                         int
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:17:18: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   17 |     for(int i = n-2;i>0;i--)
      |                 ~^~
      |                  |
      |                  int*
a.cc:21:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   21 |             tmp = n[i];
      |             ^~~
      |             tm
Language: C++

#include <iostream>

using namespace std;

int main()
{
    char a;

    cin >> a;

    int n[a-2];
    for(int i = 0;i<n-2;i++)
    {
        n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
    }

    for(int i = n-2;i>0;i--)
    {
        if(n[i]>n[i-1])
        {
            tmp = n[i];
            n[i] = n[i-1];
            n[i-1] = tmp;

        }
    }
    printf("%d\n",n[0]);
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     for(int i = 0;i<n-2;i++)
      |                   ~^~~~
a.cc:14:22: error: invalid types 'char[int]' for array subscript
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                      ^
a.cc:14:37: error: invalid types 'char[int]' for array subscript
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                     ^
a.cc:14:53: error: invalid types 'char[int]' for array subscript
   14 |         n[i] = atoi(a[i])*100+atoi(a[i+1])*10+atoi(a[i+2]);
      |                                                     ^
a.cc:17:18: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   17 |     for(int i = n-2;i>0;i--)
      |                 ~^~
      |                  |
      |                  int*
a.cc:21:13: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   21 |             tmp = n[i];
      |             ^~~
      |             tm
Language: C++

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

int main(){
vector<int> s(n);
for (int i=0;i<n;i++){
cin >> s.at(i);
}
int x[n-2];
for (int i=0;i<n-2;i++){
x[i]=100*s.at(i)+10*s.at(i+1)+s.at(i+2);
}
int ans=999;
int p=0;
for (int i=0;i<n-2;i++){
if(x[i]>777){
p=x[i]-777;
}
else {
p=777-x[i];
}
ans=min(ans,p);
}
cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'n' was not declared in this scope
    7 | vector<int> s(n);
      |               ^
a.cc:13:1: error: 'x' was not declared in this scope
   13 | x[i]=100*s.at(i)+10*s.at(i+1)+s.at(i+2);
      | ^
a.cc:18:4: error: 'x' was not declared in this scope
   18 | if(x[i]>777){
      |    ^
Language: C++

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

int main(){
vector<int> s(n);
for (int i=0;i<n;i++){
cin >> s.at(i);
}
int x[n-2];
for (int i=0;i<n-2;i++){
x[i]=100*s.at(i)+10*s.at(i+1)+s.at(i+2);
}
int ans=999;
int p=0;
for (int i=0;i<n-2;i++){
if(x[i]>777){
p=x[i]-777;
}
else {
p=777-x[i];
}
ans=min(ans,p);
}
cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'vector' was not declared in this scope
    6 | vector<int> s(n);
      | ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:6:8: error: expected primary-expression before 'int'
    6 | vector<int> s(n);
      |        ^~~
a.cc:7:16: error: 'n' was not declared in this scope
    7 | for (int i=0;i<n;i++){
      |                ^
a.cc:8:8: error: 's' was not declared in this scope
    8 | cin >> s.at(i);
      |        ^
a.cc:10:7: error: 'n' was not declared in this scope
   10 | int x[n-2];
      |       ^
a.cc:12:1: error: 'x' was not declared in this scope
   12 | x[i]=100*s.at(i)+10*s.at(i+1)+s.at(i+2);
      | ^
a.cc:12:10: error: 's' was not declared in this scope
   12 | x[i]=100*s.at(i)+10*s.at(i+1)+s.at(i+2);
      |          ^
a.cc:17:4: error: 'x' was not declared in this scope
   17 | if(x[i]>777){
      |    ^
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

char moji[11];
scanf("%s",moji);

int min,lena,len,x,sa,i;
len=strlen(moji);
lena=len-2;
min=1000;

for(i=0;i<lena;i++){
x=moji[i]*100+moji[i+1]*10+moji[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

printf("%s",min)

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:29:17: error: expected ';' before 'return'
   29 | printf("%s",min)
      |                 ^
      |                 ;
   30 | 
   31 | return 0;
      | ~~~~~~
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

char moji[11];
scanf("%s",moji);

int min,lena,len,x,sa,i;
len=strlen(moji);
lena=len-2;
min=1000;

for(i=0;i<lena;i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:15:3: error: 'S' undeclared (first use in this function)
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

char moji[11];
scanf("%s",moji);

int min,lena,len,x,sa,i;
len=strlen(moji);
lena=len-2;
min=1000;

for(i=0;i<lena,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:14:19: error: expected ';' before ')' token
   14 | for(i=0;i<lena,i++){
      |                   ^
      |                   ;
main.c:15:3: error: 'S' undeclared (first use in this function)
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

str moji[11];
scanf("%s",moji);

int min,lena,len,x,sa,i;
len=strlen(moji);
lena=len-2;
min=1000;

for(i=0;i<lena,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: unknown type name 'str'
    6 | str moji[11];
      | ^~~
main.c:10:12: error: passing argument 1 of 'strlen' from incompatible pointer type [-Wincompatible-pointer-types]
   10 | len=strlen(moji);
      |            ^~~~
      |            |
      |            int *
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int *'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:14:19: error: expected ';' before ')' token
   14 | for(i=0;i<lena,i++){
      |                   ^
      |                   ;
main.c:15:3: error: 'S' undeclared (first use in this function)
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

int moji;
scanf("%d",&moji);

int min,lena,len,x,sa,i;
len=strlen(moji);
lena=len-2;
min=1000;

for(i=0;i<lena,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 | len=strlen(moji);
      |            ^~~~
      |            |
      |            int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:14:19: error: expected ';' before ')' token
   14 | for(i=0;i<lena,i++){
      |                   ^
      |                   ;
main.c:15:3: error: 'S' undeclared (first use in this function)
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |   ^
main.c:15:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

int S;
scanf("%d",&S);

int min,lena,len,x,sa,i;
len=strlen(S);
lena=len-2;
min=1000;

for(i=0;i<lena,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:12: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 | len=strlen(S);
      |            ^
      |            |
      |            int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:14:19: error: expected ';' before ')' token
   14 | for(i=0;i<lena,i++){
      |                   ^
      |                   ;
main.c:15:4: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |    ^
main.c:15:13: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |             ^
main.c:15:23: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |                       ^
Language: C

#include<stdio.h>
#include<string.h>

int main(void){

int S;
scanf("%d",&S);

int min,str,stra,x,sa,i;
stra=strlen(S);
str=str1-2;
min=1000;

for(i=0;i<str,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 | stra=strlen(S);
      |             ^
      |             |
      |             int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:11:5: error: 'str1' undeclared (first use in this function); did you mean 'stra'?
   11 | str=str1-2;
      |     ^~~~
      |     stra
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: expected ';' before ')' token
   14 | for(i=0;i<str,i++){
      |                  ^
      |                  ;
main.c:15:4: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |    ^
main.c:15:13: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |             ^
main.c:15:23: error: subscripted value is neither array nor pointer nor vector
   15 | x=S[i]*100+S[i+1]*10+S[i+2];
      |                       ^
Language: C

#include<stdio.h>
#include <string.h>

int main(void){

int S;
scanf("%d",&S);

int min,str,str1,x,sa;
str1=strlen(S);
str=str1-2;
min=1000;

for(i=0;i<str,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 | str1=strlen(S);
      |             ^
      |             |
      |             int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:14:5: error: 'i' undeclared (first use in this function)
   14 | for(i=0;i<str,i++){
      |     ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: expected ';' before ')' token
   14 | for(i=0;i<str,i++){
      |                  ^
      |                  ;
Language: C

#include<stdio.h>
#include <string.h>

int main(void){

int S;
scanf("%d",S);

int min,str,str1,x,sa;
str1=strlen(S);
str=str1-2;
min=1000;

for(i=0;i<str,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 | str1=strlen(S);
      |             ^
      |             |
      |             int
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'int'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:14:5: error: 'i' undeclared (first use in this function)
   14 | for(i=0;i<str,i++){
      |     ^
main.c:14:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:18: error: expected ';' before ')' token
   14 | for(i=0;i<str,i++){
      |                  ^
      |                  ;
Language: C

#include<studio.h>
#include <string.h>

int main(void){

int S;
scanf("%d",S);

int min,str,str1,x,sa;
str1=strlen(S);
str=str1-2;
min=1000;

for(i=0;i<str,i++){
x=S[i]*100+S[i+1]*10+S[i+2];

if(x==753){
printf("0");
break;}

if(x<753){
sa=753-x;}else{
sa=x-753;}

if(min>sa){
min=sa;}
}

return 0;

}

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

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

int main(){
    string a;
    int t=200000001;
    cin>>a;
    for(int i=0;i<strlen(a);i++){
        if(t>abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753)){
            t=abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753);
        }
    }
    cout<<t<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |     for(int i=0;i<strlen(a);i++){
      |                          ^
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
Language: C++

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

int main(){
    string a;#include<bits/stdc++.h>
using namespace std;

int main(){
    string a;
    int t=200000001;
    cin>>a;
    for(int i=0;i<8;i++){
        if(t>abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753)){
            t=abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753);
        }
    }
    cout<<t<<endl;
}

    int t=200000001;
    cin>>a;
    for(int i=0;i<8;i++){
        if(t>abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753)){
            t=abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753);
        }
        cout<<abs((a[i]-'0')*100+(a[i+1]-'0')*10+(a[i+2]-'0')-753)<<endl;
    }
    cout<<t<<endl;
}


Compiler output:
a.cc:5:14: error: stray '#' in program
    5 |     string a;#include<bits/stdc++.h>
      |              ^
a.cc: In function 'int main()':
a.cc:5:15: error: 'include' was not declared in this scope
    5 |     string a;#include<bits/stdc++.h>
      |               ^~~~~~~
a.cc:5:23: error: 'bits' was not declared in this scope
    5 |     string a;#include<bits/stdc++.h>
      |                       ^~~~
a.cc:5:28: error: 'stdc' was not declared in this scope; did you mean 'std'?
    5 |     string a;#include<bits/stdc++.h>
      |                            ^~~~
      |                            std
a.cc:6:1: error: expected primary-expression before 'using'
    6 | using namespace std;
      | ^~~~~
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 | int main(){
      |         ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
    8 | int main(){
      |         ^~
      |         --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:8:11: error: a function-definition is not allowed here before '{' token
    8 | int main(){
      |           ^
Language: C++

#include <cstdio>

#include <algorithm>

using namespace std;

int main() {
  long long a;
  int ans = 1000;
  scanf("%lld", &a);
  while (a > 99) {
    ans = min(ans, abs(753 - a % 1000));
    a /= 10;
  }
  printf("%d\n", ans);
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: no matching function for call to 'min(int&, long long int)'
   12 |     ans = min(ans, abs(753 - a % 1000));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:3:
/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:12:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   12 |     ans = min(ans, abs(753 - a % 1000));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/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:12:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |     ans = min(ans, abs(753 - a % 1000));
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

# include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(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 ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
using namespace std;
using lint = long long;
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 ctoi(const char c)
{
    if ('0' <= c && c <= '9') return {c - '0'};
    return -1;
}

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

    vector<int> li;
    for (int i = 0; i < S.length() - 3; ++i)
    {
        int a = ctoi(S[i]);
        int b = ctoi(S[i + 1]);
        int c = ctoi(S[i + 2]);

        int d = 100*a + 10*b + c;

        li.pb(abs(753 - d));
    }

    sort(li.rbigin(), li.rend());

    cout << li[0] << "\n";

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:27: error: request for member 'length' in 'S', which is of non-class type 'int'
   27 |     for (int i = 0; i < S.length() - 3; ++i)
      |                           ^~~~~~
a.cc:29:23: error: invalid types 'int[int]' for array subscript
   29 |         int a = ctoi(S[i]);
      |                       ^
a.cc:30:23: error: invalid types 'int[int]' for array subscript
   30 |         int b = ctoi(S[i + 1]);
      |                       ^
a.cc:31:23: error: invalid types 'int[int]' for array subscript
   31 |         int c = ctoi(S[i + 2]);
      |                       ^
a.cc:38:13: error: 'class std::vector<int>' has no member named 'rbigin'; did you mean 'rbegin'?
   38 |     sort(li.rbigin(), li.rend());
      |             ^~~~~~
      |             rbegin
Language: C++

int main() {
	int min = 10000, a, b, c,d;
	char str[100] = {};
	cin >> str;
	for (int i = 2; str[i] != '\0'; i++) {
		a = (str[i - 2] - '0') * 100;
		b = (str[i - 1] - '0') * 10;
		c = str[i] - '0';
		d = a + b + c;
		if (753 >= d && min > 753 - d) min = 753 - d;
		else if (753 < d && min > d - 753) min = d - 753;
	}
	cout << min;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope; did you mean 'min'?
    4 |         cin >> str;
      |         ^~~
      |         min
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << min;
      |         ^~~~
Language: C

    #include <stdio.h>
    #include <stdlib.h>
    int main ()
    {
    int x,i,len_s;
    int x_min = 1000;
    char s[11];
    scanf("%s",s);
    for(len_s=0;s[len_s]!='\0';len_s++);
    for(i=0;i<=len_s-3;i++){
    x=abs(753-(s[i]-'0')*100+(s[i+1]-'0')*10+(s[i+2]-'0'));
    x_min=(x_min>x)?x:x_min;
    }
    printf("%d",x_min)；
    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:14:23: error: expected ';' before '\U0000ff1b'
   14 |     printf("%d",x_min)；
      |                       ^~
      |                       ;
Language: C

#include <stdio.h>
#include <stdlib.h>
int main ()
{
  int x,i,len_s;
  int x_min = 1000;
  char s[11];
  scanf("%s",s);
  for(len_s=0;s[len_s]!='\0';len_s++);
  for(i=0;i<=len_s-3;i++){
    x=abs(753-(s[i]-'0')*100+(s[i+1]-'0')*10+(s[i+2]-'0'));
    x_min=(x_min>x)?x:x_min;  
  }
  printf("%d",x_min)
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:21: error: expected ';' before 'return'
   14 |   printf("%d",x_min)
      |                     ^
      |                     ;
   15 |   return 0;
      |   ~~~~~~
Language: C

#include<iostream>
#include<string>
using namespace std;
int main(){
    string s;
    cin>>s;
    int len=s.length();
    int min_number=753;
    for(int i=0;i<len-2;i++){
	int temp=0;
	temp+=s[i]-'0';
	temp*=10;
	temp+=s[i+1]-'0';
	temp*=10;
	temp+=s[i+2]-'0';
	temp-=753;
	if(temp<0) temp=-temp;
	min_number=min_number>temp? temp:min_number;
	//cout<<temp<<endl;
    }
    cout<<min_number<<endl;
    return 0;
}

Compiler output:
main.c:1:9: fatal error: iostream: No such file or directory
    1 | #include<iostream>
      |         ^~~~~~~~~~
compilation terminated.
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;

public class Main {

	// Atcoder用のサンプルプログラム
	public static void main(String[] args) {
		String line = "";
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			
			//line = br.readLine();
			String s= br.readLine();
			//StringTokenizer st = new StringTokenizer(line, "");
			int min = 9999999999;
			for (int i =0;i < s.length()-2;i++) {
				int temp = Integer.parseInt(s.substring(i, i+3));
				if (753-temp < min) {
					min= Math.abs(753-temp);
				}
			}
			
			System.out.println(min);

			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}


Compiler output:
Main.java:20: error: integer number too large
			int min = 9999999999;
			          ^
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
	int ans = 10000;
	int X;
	string S;
	cin >> S;
	for (int i = 0; i < S.size() - 2; i++) {
		X = 0;
		for (int j = 0; j < 3; j++) {
			X += (S[i + j] - '0')*pow(10, 2 - j);
		}
		if (ans > abs(X - 753))ans = abs(X - 753);
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:47: error: 'pow' was not declared in this scope
   12 |                         X += (S[i + j] - '0')*pow(10, 2 - j);
      |                                               ^~~
Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main()
{
	string x;
	cin >> x;

	int min = INT32_MAX;
	for (int i = 0; i < x.size - 3; i++)
	{
		int sub = abs(stoi(x.substr(i, 3)) - 753);
		if (sub < min)
			min = sub;
	}
	cout << min;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: 'INT32_MAX' was not declared in this scope
   13 |         int min = INT32_MAX;
      |                   ^~~~~~~~~
a.cc:5:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    4 | #include <vector>
  +++ |+#include <cstdint>
    5 | 
a.cc:14:31: 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 '()' ?)
   14 |         for (int i = 0; i < x.size - 3; i++)
      |                             ~~^~~~
      |                                   ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long i64;typedef vector<int> ivec;typedef vector<string> svec;

int main{
	string S;
	cin >> S;
	i64 a = S.size();
	i64 ans = 753;
	i64 s = 0;
	for(i64 i=0;i<a-2;i++){
		s = (S[i]-'0')*100+(S[i+1]-'0')*10+(S[i+2]-'0');
		ans = min(ans,abs(753-s));
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main{
      |     ^~~~
a.cc:6:16: error: expected primary-expression before 'S'
    6 |         string S;
      |                ^
a.cc:6:16: error: expected '}' before 'S'
a.cc:5:9: note: to match this '{'
    5 | int main{
      |         ^
a.cc:7:9: error: 'cin' does not name a type
    7 |         cin >> S;
      |         ^~~
a.cc:8:17: error: 'S' was not declared in this scope
    8 |         i64 a = S.size();
      |                 ^
a.cc:11:9: error: expected unqualified-id before 'for'
   11 |         for(i64 i=0;i<a-2;i++){
      |         ^~~
a.cc:11:21: error: 'i' does not name a type
   11 |         for(i64 i=0;i<a-2;i++){
      |                     ^
a.cc:11:27: error: 'i' does not name a type
   11 |         for(i64 i=0;i<a-2;i++){
      |                           ^
a.cc:15:9: error: 'cout' does not name a type
   15 |         cout << ans << endl;
      |         ^~~~
a.cc:16:9: error: expected unqualified-id before 'return'
   16 |         return 0;
      |         ^~~~~~
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^