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


#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define REP(i, n) FOR(i, 0, n)

#include <cstdio>
#include <vector>
#include <cstring>

using namespace std;

int wait(int x) {
    int remain = x % 10;
    if (remain > 0) {
        return 10 - remain;
    }

    return 0;
}

int main(){
    int A[5];

    REP(i, 5) {
        scanf("%d", &A[i]);
    }

    int res = INT_MAX;

    REP(i1, 5) {
        REP(i2, 5) {
            if (i2 == i1) continue;
            REP(i3, 5) {
                if (i3 == i1 || i3 == i2) continue;
                REP (i4, 5) {
                    if (i4 == i1 || i4 == i2 || i4 == i3) continue;
                    REP (i5, 5) {
                        if (i5 == i1 || i5 == i2 || i5 == i3 || i5 == i4) continue;

                        int tmp = 0;
                        int a = A[i1];
                        int b = A[i2];
                        int c = A[i3];
                        int d = A[i4];
                        int e = A[i5];

                        tmp = a + wait(a) + b + wait(b) + c + wait(c) + d + wait(d) + e;

                        res = tmp < res ? tmp : res;
                    }
                }
            }
        }
    }

    printf("%d\n", res);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:15: error: 'INT_MAX' was not declared in this scope
   27 |     int res = INT_MAX;
      |               ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    7 | #include <cstring>
  +++ |+#include <climits>
    8 |
Language: C++

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

int main(){
    int H,W;
    cin>>H>>W;
    vector<vector<char>> a(H+2)(W+2);

    for(int i=1;i<=H;i++){
        for(int j=1;j<=W;j++){
            cin>>a[i][j];
        }
    }

    for(int i=0;i<H+2;i++){
        a[i][0] = '#';
        a[i][W+1] = '#';
    }
    for(int i=0;i<W+2;i++){
        a[0][i] = '#';
        a[H+1][i] = '#';
    }

    for(int i=0;i<=H+1;i++){
        for(int j=0;j<=W+1;j++){
            cout<<a[i][j];
        }
        cout<<"\n";
    }
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected ',' or ';' before '(' token
    7 |     vector<vector<char>> a(H+2)(W+2);
      |                                ^
Language: C

#include <stdio.h>
int main(void){
  
  void swap(int a,int b)
  {
    int tmp;
    tmp=a;
    a=b;
    b=tmp;
  }
  int A[5];
  int a[5];
  int i,min=0;
  int b[5],c[5];
  int sum=0;
  
  //文字の入力
  for(i=0;i<5;i++){
    scanf("%d",&A[i]);
  }
  //1の位をa[]に代入
  for(i=0;i<5;i++){
    a[i]=A[i]%10;
  }
  //1の位の最小値を探す。
   for(i=0;i<5;i++){
  if(0<a[i]){
  min=a[i];
    if(min==a[i]) i=5;
  }}
  for(i=0;i<5;i++){
    if(0<a[i]<min){
      min=a[i];
    　swap(a[i],a[4]);
      swap(A[i],A[4]);
  }}
  //a[]の最小値以外を10の倍数にする。
  for(i=0;i<4;i++){ 
  b[i]=10-a[i];
  A[i]=A[i]+b[i];
    }
  
  //出た数字をすべて足す。
    for(i=0;i<5;i++){
        sum=sum+A[i];
      }
      
printf("%d",sum);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:5: error: stray '\343' in program
   34 |     <U+3000>swap(a[i],a[4]);
      |     ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    // 整数の入力
    int *place;
  int total = 0;
  int rem = 10;
    time = new int[5];
    for(int i=0;i<5;i++)
    {
        scanf("%d",&time[i]);
    }
  for(int i=0;i<5;i++)
  {
    int r = time[i] % 10;
    if( r < rem)
    {
      rem = r;
    }
      total += (time[i]/10 +(r!=0));
  }
  total = total * 10;
    cout << total << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: assignment of function 'time_t time(time_t*)'
    9 |     time = new int[5];
      |     ~~~~~^~~~~~~~~~~~
a.cc:12:27: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   12 |         scanf("%d",&time[i]);
      |                           ^
a.cc:16:19: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   16 |     int r = time[i] % 10;
      |                   ^
a.cc:16:21: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'int' to binary 'operator%'
   16 |     int r = time[i] % 10;
      |             ~~~~~~~ ^ ~~
      |                   |   |
      |                   |   int
      |                   time_t(time_t*) noexcept {aka long int(long int*) noexcept}
a.cc:21:23: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   21 |       total += (time[i]/10 +(r!=0));
      |                       ^
a.cc:21:24: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'int' to binary 'operator/'
   21 |       total += (time[i]/10 +(r!=0));
      |                 ~~~~~~~^~~
      |                       | |
      |                       | int
      |                       time_t(time_t*) noexcept {aka long int(long int*) noexcept}
a.cc: At global scope:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>

using namespace::std;

int main() {
	vector<int> dishes(5); 
	cin >> dishes[0];
	cin >> dishes[1];
	cin >> dishes[2];
	cin >> dishes[3];
	cin >> dishes[4];

	int ans = 0;
	int max_diff=0;
	for (int i = 0; i < dishes.size; i++) {
		int time = ceil(dishes[i]);
		max_diff = max(max_diff, time - dishes[i]);
		ans += time;
	}
	ans = ans - max_diff;

	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:36: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
   17 |         for (int i = 0; i < dishes.size; i++) {
      |                             ~~~~~~~^~~~
      |                                        ()
a.cc:18:28: error: 'ceil' was not declared in this scope
   18 |                 int time = ceil(dishes[i]);
      |                            ^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main(){
  int s=0,a[5];
  for(int i=0;i<5;++i){
    cin>>a[i];
    if(i){
      if(a[i]%10>a[i-1]%10&&a[i-1])swap(a[i],a[i-1]);
    }
  }
  for(int i=0;i<5;++i){
    if(i==4)s+=a[i],break;
    if(a[i]%10)a[i]+=10;
    s+=(a[i]/10)*10;
  }
  cout<<s<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected primary-expression before 'break'
   14 |     if(i==4)s+=a[i],break;
      |                     ^~~~~
Language: C++

#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int inf = 1012345678;
int main() {
	vector<int> A(5);
	cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
	vector<int> P = { 0, 1, 2, 3, 4 };
	int final_answer = inf;
	do {
		int ans = 0;
		for (int i = 0; i < 5; ++i) {
			while (ans % 10 != 0) ans += 1;
			ans += A[P[i]];
		}
		final_answer = min(final_answer, ans);
	} while (next_permutation(P.begin(), P.end()));
	cout << final_answer << endl;
	return 0;
}
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int inf = 1012345678;
int main() {
	vector<int> A(5);
	cin >> A[0] >> A[1] >> A[2] >> A[3] >> A[4];
	vector<int> P = { 0, 1, 2, 3, 4 };
	int final_answer = inf;
	do {
		int ans = 0;
		for (int i = 0; i < 5; ++i) {
			while (ans % 10 != 0) ans += 1;
			ans += A[P[i]];
		}
		final_answer = min(final_answer, ans);
	} while (next_permutation(P.begin(), P.end()));
	cout << final_answer << endl;
	return 0;
}
提出情報

Compiler output:
a.cc:26:11: error: redefinition of 'const int inf'
   26 | const int inf = 1012345678;
      |           ^~~
a.cc:5:11: note: 'const int inf' previously defined here
    5 | const int inf = 1012345678;
      |           ^~~
a.cc:27:5: error: redefinition of 'int main()'
   27 | int main() {
      |     ^~~~
a.cc:6:5: note: 'int main()' previously defined here
    6 | int main() {
      |     ^~~~
a.cc:43:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   43 | 提出情報
      | ^~~~~~~~
Language: C

#include <stdio.h>
int main(void){
  
  void
    swap(int a,int b)
  {
    int tmp;
    tmp=a;
    a=b;
    b=tmp;
  }
  int A[5];
  int a[5];
  int i,min=0;
  int b[5],c[5];
  int sum=0;
  
  //文字の入力
  for(i=0;i<5;i++){
    scanf("%d",&A[i]);
  }
  //1の位をa[]に代入
  for(i=0;i<5;i++){
    a[i]=A[i]%10;
  }
  //1の位の最小値を探す。
   for(i=0;i<5;i++){
  if(0<a[i]){
  min=a[i];
    if(min==a[i]) i=5;
  }}
  for(i=0;i<5;i++){
    if(0<a[i]<min){
      min=a[i];
    swap(a[i],a[4]);
      swap(A[i],A[4]);
  }
  //a[]の最小値以外を10の倍数にする。
  for(i=0;i<4;i++){ 
  b[i]=10-a[i];
  A[i]=A[i]+b[i];
    }
  
  //出た数字をすべて足す。
    for(i=0;i<5;i++){
        sum=sum+A[i];
      }
      
printf("%d",sum);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:52:1: error: expected declaration or statement at end of input
   52 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int ans=0;
  int m=0;
	for(int i=0;i<5;i++){
 	 int a;
 	 cin >> a;
     if(a%10){
       		m=max(m,10-a%10);
      		a+=10-a%10;
     }
      ans+=a;
    }
  cout << ans-m << end1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'end1' was not declared in this scope
   16 |   cout << ans-m << end1;
      |                    ^~~~
Language: C++

#inclue<iostream>
using namespace std;

int main(){
  int ans=0;
  int m=0;
	for(int i=0;i<5;i++){
 	 int a;
 	 cin >> a;
     if(a%10){
       		m=max(m,10-a%10);
      		a+=10-a%10;
     }
      ans+=a;
    }
  cout << ans-m << end1;
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:9:10: error: 'cin' was not declared in this scope
    9 |          cin >> a;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclue<iostream>
a.cc:11:19: error: 'max' was not declared in this scope
   11 |                 m=max(m,10-a%10);
      |                   ^~~
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout << ans-m << end1;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:20: error: 'end1' was not declared in this scope
   16 |   cout << ans-m << end1;
      |                    ^~~~
Language: C++

#inclue<iostream>
using namespace std;

int main{
  int ans=0;
  int m=0;
	for(int i=0;i<5;i++){
 	 int a;
 	 cin >> a;
     if(a%10){
       		m=max(m,10-a%10);
      		a+=10-a%10;
     }
      ans+=a;
    }
  cout << ans-m << end1;
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int ans=0;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:9: error: expected unqualified-id before 'for'
    7 |         for(int i=0;i<5;i++){
      |         ^~~
a.cc:7:21: error: 'i' does not name a type
    7 |         for(int i=0;i<5;i++){
      |                     ^
a.cc:7:25: error: 'i' does not name a type
    7 |         for(int i=0;i<5;i++){
      |                         ^
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << ans-m << end1;
      |   ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#inclue<iostream>
using namespace std;

int main{
  int ans=0;
  int m=0;
	for(i=0;i<5;i++){
 	 int a;
 	 cin >> a;
     if(a%10){
       		m=max(m,10-a%10);
      		a+=10-a%10;
     }
      ans+=a;
    }
  cout << ans-m <<end1;
  return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int ans=0;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:9: error: expected unqualified-id before 'for'
    7 |         for(i=0;i<5;i++){
      |         ^~~
a.cc:7:17: error: 'i' does not name a type
    7 |         for(i=0;i<5;i++){
      |                 ^
a.cc:7:21: error: 'i' does not name a type
    7 |         for(i=0;i<5;i++){
      |                     ^
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << ans-m <<end1;
      |   ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#inclue<iostream>
using namespace std;

int main{
  int ans=0;
  int m=0;
	for(i=0;i<5;i++){
 	 int a;
 	 cin >> a
     if(a%10){
       		m=max(m,10-a%10);
      		a+=10-a%10;
     }
      ans+=a
    }
  cout << ans-m <<end1;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclue; did you mean #include?
    1 | #inclue<iostream>
      |  ^~~~~~
      |  include
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int ans=0;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:9: error: expected unqualified-id before 'for'
    7 |         for(i=0;i<5;i++){
      |         ^~~
a.cc:7:17: error: 'i' does not name a type
    7 |         for(i=0;i<5;i++){
      |                 ^
a.cc:7:21: error: 'i' does not name a type
    7 |         for(i=0;i<5;i++){
      |                     ^
a.cc:16:3: error: 'cout' does not name a type
   16 |   cout << ans-m <<end1;
      |   ^~~~
a.cc:17:3: error: expected unqualified-id before 'return'
   17 |   return 0;
      |   ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  int a[5];
  int i,temp,sum=0;
  for(i=0;i<5;i++){
  	scanf("%d",&a[i]);
    	if(a[i]%10!=0){
   			if(a[0]%10<a[i]%10){
      			temp=a[0];
      			a[0]=a[i];
      			a[i]=temp;
 			 }
 		 }
  				for(i=1;i<5;i++){
                  if(a[i]%10==0){
                    sum+=a[i];
                  }
  					else{
                      a[i]=10-a[i]%10+a[i];
   				 	sum+=a[i];
                    }
  					}
  						sum+=a[4];
  						printf("%d\n",sum);
  						return 0;
						}
    


Compiler output:
main.c: In function 'main':
main.c:26:49: error: expected declaration or statement at end of input
   26 |                                                 }
      |                                                 ^
Language: C++

xs = [int(input()) for i in range(5)]
ps = []
for x in xs:
	ps.append(((x-1)%10+1, x))
ps.sort()
ans = 0
ans += ps[0][1]
for i in range(1, 5):
	print(ps[i])
	ans += (ps[i][1] + 9) // 10 * 10
print(ans)


Compiler output:
a.cc:1:1: error: 'xs' does not name a type
    1 | xs = [int(input()) for i in range(5)]
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector<int> x(5);
  int A,B,C,D,E;
  cin >> A >> B >> C >> D >> E;
  x[0] = A%10;
  x[1] = B%10;
  x[2] = C%10;
  x[3] = D%10;
  x[4] = E%10;
  sort (x.begin(), x.end());i
  int Y = 40 - x[1] - x[2] - x[3] - x[4];
  for (int i=1; i<5; i++) {
    if (x[i] == 0) Y -= 10;
  }
  cout << A+B+C+D+E+Y << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'i' was not declared in this scope
   13 |   sort (x.begin(), x.end());i
      |                             ^
a.cc:16:20: error: 'Y' was not declared in this scope
   16 |     if (x[i] == 0) Y -= 10;
      |                    ^
a.cc:18:21: error: 'Y' was not declared in this scope
   18 |   cout << A+B+C+D+E+Y << endl;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector<int> x(5);
  int A,B,C,D,E;
  cin >> A >> B >> C >> D >> E;
  x[0] = A%10;
  x[1] = B%10;
  x[2] = C%10;
  x[3] = D%10;
  x[4] = E%10;
  sort (x.begin(), x.end());i
  int Y = 40 - x[1] - x[2] - x[3] - x[4];
  for (int i=1; i<5; i++) {
    if (x[i] == 0) Y -= 10;
  }
  cout << A+B+C+D+E+Y << endl;
    

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: 'i' was not declared in this scope
   13 |   sort (x.begin(), x.end());i
      |                             ^
a.cc:16:20: error: 'Y' was not declared in this scope
   16 |     if (x[i] == 0) Y -= 10;
      |                    ^
a.cc:18:21: error: 'Y' was not declared in this scope
   18 |   cout << A+B+C+D+E+Y << endl;
      |                     ^
a.cc:18:31: error: expected '}' at end of input
   18 |   cout << A+B+C+D+E+Y << endl;
      |                               ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:12:7: error: 'temp' undeclared (first use in this function)
   12 |       temp=a[0];
      |       ^~~~
main.c:12:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:5: error: 'sum' undeclared (first use in this function)
   20 |     sum+=a[i];
      |     ^~~
Language: C

#include<stdio.h>
int main(void){
  int a[5];
  int i;
  for(i=0;i<5;i++){
  scanf("%d",&a[i]);
  }
  for(i=0;i<5;i++){
   a[i]=10-a[i]%10+a[i];
    sum+=i[0];
  }
  return 0;
}
 

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'sum' undeclared (first use in this function)
   10 |     sum+=i[0];
      |     ^~~
main.c:10:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:11: error: subscripted value is neither array nor pointer nor vector
   10 |     sum+=i[0];
      |           ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    int ans = 0;
    
    for(int i=0;i<5;i++){
      int i = sc.nextInt();
      if(i%10 == 0){
        ans += i;
      }else{
        while(i%10 != 0){
          i++;
        }
        if(i%10 == 0){
        ans += i;
      }
      }
    }
    System.out.println(ans);
  }
}
    

Compiler output:
Main.java:10: error: variable i is already defined in method main(String[])
      int i = sc.nextInt();
          ^
1 error
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
 
int main(){
  int a,b,c,d,e;
  int list[] = {a,b,c,d,e};
  cin >> a >> b >> c >> d >> e;
  for(int x : list){
    int y = floor(x / 10)
    cout << (y + 1) * 10 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'cout'
   12 |     cout << (y + 1) * 10 << endl;
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
using namespace std;
 
int main(){
  int a,b,c,d,e;
  int list[] = {a,b,c,d,e}
  cin >> a >> b >> c >> d >> e;
  for(int x : list){
    cout << (floor(x / 10) + 1) * 10 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cin'
    9 |   cin >> a >> b >> c >> d >> e;
      |   ^~~
Language: C++

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

int main(){
  int a,b,c,d,e;
  int list[] = {a,b,c,d,e}
  cin >> a >> b >> c >> d >> e;
  for(x : list){
    cout << (floor(x / 10) + 1) * 10 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'cin'
    9 |   cin >> a >> b >> c >> d >> e;
      |   ^~~
a.cc:10:9: error: found ':' in nested-name-specifier, expected '::'
   10 |   for(x : list){
      |         ^
      |         ::
a.cc:10:7: error: 'x' has not been declared
   10 |   for(x : list){
      |       ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:4: error: expected ';' before '}' token
   12 |   }
      |    ^
      |    ;
   13 | }
      | ~   
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
a.cc:12:4: error: expected ')' before '}' token
   12 |   }
      |    ^
      |    )
   13 | }
      | ~   
a.cc:10:6: note: to match this '('
   10 |   for(x : list){
      |      ^
a.cc:13:1: error: expected primary-expression before '}' token
   13 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
#define rep(i,n) for(ll i = 0; i < ll(n); i++)
#define reep(i,n) for(ll i = n; i >-1; i--)
#define deb(variable) cout<<#variable<<"="<<variable<<endl;
#define pb push_back
const ll INF=99999999999999999;
const ll MAX_N=100010;
ll a,b,c,d,e,x,y,m,n,l,q,ans=0;
vl v,v1,v2;
int main(){
    cin>>a>>b>>c>>d>>e>>k;
    v.push_back(a%10);
    v.push_back(b%10);
    v.push_back(c%10);
    v.push_back(d%10);
    v.push_back(e%10);
    sort(v.begin(),v.end());
    cout<<(a-1)/10+(b-1)/10+(c-1)/10+(d-1)/10+(e-1)/10+50+v[0]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:25: error: 'k' was not declared in this scope
   14 |     cin>>a>>b>>c>>d>>e>>k;
      |                         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	vector<int> a(5);
  	int minimam = 9;
    int sums = 0;
    for (int i=0;i<5;i++){
      cin>>a[i];
      minimam = min(minimam,a[i]%10);
      #cout << ceil(float(a[i])/10.0)<< endl;
      sums += 10 * ceil(float(a[i])/10.0);
    }
    sums = sums - 10 + minimam;
    cout << sums << endl;
	return 0;	
}

Compiler output:
a.cc:10:8: error: invalid preprocessing directive #cout
   10 |       #cout << ceil(float(a[i])/10.0)<< endl;
      |        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
	vector<int> a(5);
  	int minimam = 9;
    int sums = 0;
    for (int i=0;i<5;i++){
      cin>>a[i];
      minimum = min(minimam,a[i]%10);
      #cout << ceil(float(a[i])/10.0)<< endl;
      sums += 10 * ceil(float(a[i])/10.0);
    }
    sums = sums - 10 + min;
    cout << sums << endl;
	return 0;	
}

Compiler output:
a.cc:10:8: error: invalid preprocessing directive #cout
   10 |       #cout << ceil(float(a[i])/10.0)<< endl;
      |        ^~~~
a.cc: In function 'int main()':
a.cc:9:7: error: 'minimum' was not declared in this scope; did you mean 'minimam'?
    9 |       minimum = min(minimam,a[i]%10);
      |       ^~~~~~~
      |       minimam
a.cc:13:22: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator+'
   13 |     sums = sums - 10 + min;
      |            ~~~~~~~~~~^~~~~
Language: C++

a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
for i in a:
	b.append(10-i % 10)
for i,j in zip(b,a):
	if max[b] != i:
		c.append(i+j)
print(sum(c))
	


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a = list(map(int,[input() for i in range(5)]))
      | ^
Language: C++

a = list(map(int,[input() for i in range(5)]))
b = []
c =[]
for i in a:
	b.append(10-i % 10) #10-余りのリスト
for i,j in zip(b,a):
	if max[b] != i:
		c.append(i+j)
print(sum(c))
	

Compiler output:
a.cc:5:29: error: stray '#' in program
    5 |         b.append(10-i % 10) #10-余りのリスト
      |                             ^
a.cc:1:1: error: 'a' does not name a type
    1 | a = list(map(int,[input() for i in range(5)]))
      | ^
Language: C++

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

vector<int> a(5);

int main() {
    ios::sync_with_stdio(false);
    for (int i = 0; i < 5; i++)
        cin >> a[i];
    vector<int> p = {0,1,2,3,4};
    int fans = 987654321;
    do {
        int ans = 0;
        for (int i = 0; i < 5; i++) {

            while (ans % 10 != 0)
                ans++;

            ans += a[p[i]];
        }
        fans = min(f, ans);

    }while (next_permutation(p.begin(), p.end()));

    cout << fans << endl;


    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:20: error: 'f' was not declared in this scope
   22 |         fans = min(f, ans);
      |                    ^
Language: C++

	#include <iostream>
	#include <algorithm>


	int main() {

		std::cin.tie(nullptr); std::ios::sync_with_stdio(false);
		int max = -1;
		int ans = 0;
		for (int i = 0; i < 5; i++) {
			int num;
			std::cin >> num;
			int ceiled = 10 * std::ceil(num / 10.f);
			max = std::max(max, ceiled - num);
			ans += ceiled;
		}

		std::cout << ans - max;


		return 0;


	}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:48: error: 'ceil' is not a member of 'std'
   13 |                         int ceiled = 10 * std::ceil(num / 10.f);
      |                                                ^~~~
Language: C++

#include <iostream>
#include <algorithm>


int main() {

	std::cin.tie(nullptr); std::ios::sync_with_stdio(false);
	int max = INT_MIN;
	int ans = 0;
	for (int i = 0; i < 5; i++) {
		int num;
		std::cin >> num;
		int ceiled = 10 * std::ceil(num / 10.f);
		max = std::max(max, ceiled - num);
		ans += ceiled;
	}

	std::cout << ans - max;


	return 0;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'INT_MIN' was not declared in this scope
    8 |         int max = INT_MIN;
      |                   ^~~~~~~
a.cc:3:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    2 | #include <algorithm>
  +++ |+#include <climits>
    3 | 
a.cc:13:40: error: 'ceil' is not a member of 'std'
   13 |                 int ceiled = 10 * std::ceil(num / 10.f);
      |                                        ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int a[10];
bool cmp(int a, int b) {
	return a%10 < b%10;
}
int main() {
  int n = 5;
  for(int i=0;i<n;i++) {
    cin >> a[i];
  }
  sort(a, a+b,cmp);
  long long res = 0;
  for(int i=1;i<5;i++) {
  	res += (a[i] + ((a[i] %10 ==0) ? 0 : 10)); 
  }
  res += a[0];
  cout <<res;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: 'b' was not declared in this scope
   12 |   sort(a, a+b,cmp);
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) {
	return a%10 < b%10;
}
int main() {
  int n = 5;
  for(int i=0;i<n;i++) {
    cin >> a[i];
  }
  sort(a, a+b,cmp);
  long long res = 0;
  for(int i=1;i<5;i++) {
  	res += (a[i] + ((a[i] %10 ==0) ? 0 : 10)); 
  }
  res += a[0];
  cout <<res;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'a' was not declared in this scope
    9 |     cin >> a[i];
      |            ^
a.cc:11:8: error: 'a' was not declared in this scope
   11 |   sort(a, a+b,cmp);
      |        ^
a.cc:11:13: error: 'b' was not declared in this scope
   11 |   sort(a, a+b,cmp);
      |             ^
Language: Java

import numpy as np
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
X = np.asarray([A,B,C,D,E])
X_div = X%10
X_sort = np.sort(X_div)
min=0
for i in range(5):
	if X_sort[i]!=0:
		min=X_sort[i]
		break
if min==0:
	min=10
X=10*((X-1)//10)+10

sum=0
for i in range(5):
	sum+=X[i]
print(sum-10+min)

Compiler output:
Main.java:1: error: '.' expected
import numpy as np
            ^
Main.java:1: error: ';' expected
import numpy as np
               ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int A[10];
bool cmp(int i,mint j){
	return A[i]%10<=A[j]%10;
}
int main(){
	for(int i=0;i<5;i++)cin>>A[i];
	sort(A,A+5);
	int ans=0;
	for(int i=4;i>=0;i++){
		while(ans%10!=0)ans+=1;
		ans=ans+A[i]; 
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc:4:16: error: 'mint' has not been declared
    4 | bool cmp(int i,mint j){
      |                ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
    int A,B,C,D,E;
    cin>>A>>B>>C>>D>>E;
    int F[5];
    F[0]=10-A%10;
    if(F[0]==10)F[0]=0;
    F[1]=10-B%10;
    if(F[1]==10)F[1]=0;
    F[2]=10-C%10;
    if(F[2]==10)F[2]=0;
    F[3]=10-D%10;
    if(F[3]==10)F[3]=0;
    F[4]=10-E%10;
    if(F[4]==10)F[4]=0;
    int G[5];
    G[0]=A+B+C+D+E+F[1]+F[2]+F[3]+F[4];
    G[1]=A+B+C+D+E+F[0]+F[2]+F[3]+F[4];
    G[2]=A+B+C+D+E+F[0]+F[1]+F[3]+F[4];
    G[3]=A+B+C+D+E+F[0]+F[1]+F[2]+F[4];
    G[4]=A+B+C+D+E+F[0]+F[1]+F[2]+F[3];
    sort(G,G+5);
    int ans=G[0];
    cout<<ans<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:25:21: error: expected '}' at end of input
   25 |     cout<<ans<<endl;
      |                     ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C

main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      | ^~~~
main.c:1:1: error: type defaults to 'int' in declaration of 'main' [-Wimplicit-int]
main.c:1:6: error: 'getContents' undeclared here (not in a function)
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |      ^~~~~~~~~~~
main.c:1:20: error: 'print' undeclared here (not in a function); did you mean 'int'?
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |                    ^~~~~
      |                    int
main.c:1:26: error: expected identifier before '(' token
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |                          ^
main.c:1:27: error: stray '\' in program
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |                           ^
main.c:1:68: error: stray '`' in program
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |                                                                    ^
main.c:1:75: error: stray '`' in program
    1 | main=getContents>>=print.(\(d,m)->10*sum d+minimum m-9).unzip.map((`divMod`10).(+9).read).lines
      |                                                                           ^
Language: C++

#include <iostream>
#include <cstring>

using namespace std;

int GetDelta(int a) {
  int delta = 0;
  while(a % 10 != 0) {
    a += 1;
    delta += 1;
  }
  return delta;
}

int main() {
  vector<int> v(5, 0);
  int sum = 0;
  int sumDelta = 0;
  int maxDelta = -1;
  for(int i = 0; i < 5; ++i) {
    cin >> v[i];
    sum += v[i];
    sumDelta += GetDelta(v[i]);
    maxDelta = max(maxDelta, GetDelta(v[i]));
  }
  cout << (sum + sumDelta - maxDelta) << endl;
  return 0;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:3: error: 'vector' was not declared in this scope
   16 |   vector<int> v(5, 0);
      |   ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <cstring>
  +++ |+#include <vector>
    3 | 
a.cc:16:10: error: expected primary-expression before 'int'
   16 |   vector<int> v(5, 0);
      |          ^~~
a.cc:21:12: error: 'v' was not declared in this scope
   21 |     cin >> v[i];
      |            ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define reptr(i,n) for(int (i)=(n);(i)>=0;--(i))
#define All(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
const ll MOD=1e9+7;
using namespace std;

int main(){
  int a, m=10,n = 5;
  int b[5];
  rep(i,5){
    cin >> a;
    if(a%10==0){
      ans += a;
    }else{
      m = min(m,a%10);
      ans += (a-(a%10)+10);
    }
  }
  ans += (m-10);
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |       ans += a;
      |       ^~~
      |       abs
a.cc:22:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   22 |       ans += (a-(a%10)+10);
      |       ^~~
      |       abs
a.cc:25:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |   ans += (m-10);
      |   ^~~
      |   abs
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main(void){
    int nums[5];
    int Enums[5];
    int sum = 0;
    int ans = 10000;
    
    for(int i = 0;i < 5;i++){
        cin >> nums[i];
        Enums[i] = EditNums(nums[i]);
        sum = Enums[i];
    }
    
    for(int i = 0;i < 5;i++){
        ans = min(ans,sum - Enums[i] + nums[i]);
    }
    cout << ans << endl;
}

int EditNums(int n){
    if(n % 10 == 0){
        return n;
    }else{
        return (n / 10 + 1) * 10;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: 'EditNums' was not declared in this scope
   12 |         Enums[i] = EditNums(nums[i]);
      |                    ^~~~~~~~
Language: C++

#include <iostream>
#include <array>
#include <algorithm>

int main(int, char**) {
  std::array<int, 5> arr;
  int time{};
  int cnt{}

  for(int i{}; i < 5; ++i) {
    std::cin >> arr[i];
    if(arr[i] % 10 == 0) {
      time += arr[i];
      arr[i] = 0;
      ++cnt;
    }
  }

  if(cnt != 5) {
    auto it = std::remove_if(begin(arr), end(arr), [](int n){ return n == 0; });
    std::sort(begin(arr), it, [](int lhs, int rhs){ return lhs % 10 > rhs % 10; });
    for(auto jt = begin(arr); jt != std::prev(it); ++jt) {
      time += (*jt / 10 + 1) * 10;
    }
    time += *std::prev(it);
  }

  std::cout << time << std::endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:3: error: expected ',' or ';' before 'for'
   10 |   for(int i{}; i < 5; ++i) {
      |   ^~~
a.cc:10:16: error: 'i' was not declared in this scope
   10 |   for(int i{}; i < 5; ++i) {
      |                ^
Language: C++

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

int main(){
  vector<int> a(5),b(5),c(5);
  int count = 0, plus = 0;
  
  for(int i = 0; i < 5; i++){
    cin >> a.at(i);
    b.at(i) = a.at(i) % 10;
    c.at(i) = a.at(i) / 10;
  }
  
  sort(b.begin(),b.end());
  
  for(int i = 0; i < 5; i++){
    if(b.at(i) != 0){
      count++;
    }
  }
  if(count != 0){count -= 1}
  
  for(int i = 0; i < 5; i++){
    if(b.at(i) != 0){
      plus = b.at(i);
      break;
    }
  }

  for(int i = 0; i < 5; i++){
    count += c.at(i);
  }
  cout << count * 10 + plus ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:28: error: expected ';' before '}' token
   21 |   if(count != 0){count -= 1}
      |                            ^
      |                            ;
Language: C++

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

int main(){
  vector<int> a(5),b(5);
  int count = 4, plus;
  for(int i = 0; i < 5; i++){
    cin >> a.at(i);
    b.at(i) = a.at(i) / 10; 
  }
  sort(b.begin(),b.end());
  for(int i = 0; i < 5; i++){
    if(b.at(i) != 0){
      plus = b.at(i)
      break;
    }
  }
  
  for(int i = 0; i < 5; i++){
    count += b.at(i);
  }
  cout << count * 10 + plus ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: expected ';' before 'break'
   14 |       plus = b.at(i)
      |                     ^
      |                     ;
   15 |       break;
      |       ~~~~~
Language: C++


  REP(i,5) {
    if (a[i] % 10 != 0) {
      if (k == -1) k = a[i]%10;
      else k = min(k,a[i]%10);
    }
    ans += 10 * ((a[i] + 9)/10);
  }
  if (k == -1) cout << ans << endl;
  else cout << ans - 10 + k << endl;
  return 0;
}


Compiler output:
a.cc:2:6: error: expected constructor, destructor, or type conversion before '(' token
    2 |   REP(i,5) {
      |      ^
a.cc:9:3: error: expected unqualified-id before 'if'
    9 |   if (k == -1) cout << ans << endl;
      |   ^~
a.cc:10:3: error: expected unqualified-id before 'else'
   10 |   else cout << ans - 10 + k << endl;
      |   ^~~~
a.cc:11:3: error: expected unqualified-id before 'return'
   11 |   return 0;
      |   ^~~~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int maxtime(int x){
    return (x+9) / 10 *10;
}

int rettime(int x){
    return maxtime(x) - x;
}

int main(){
    int a,b,c,d,e, sum;
    cin >> a >> b >> c >> d >> e;

    sum = maxtime(a)+maxtime(b)+maxtime(c)+maxtime(d)+maxtime(e);
    sum -= max({rettime(a),rettime(d),rettime(c),rettime(d),rettime(e)});

    cout << sum << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   17 |     sum -= max({rettime(a),rettime(d),rettime(c),rettime(d),rettime(e)});
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <iostream>
using namespace std;

int maxtime(int x){
    return (x+9) / 10 *10;
}

int rettime(int x){
    return maxtime(x) - x;
}

int main(){
    int a,b,c,d,e, sum;
    cin >> a >> b >> c >> d >> e;

    sum = maxtime(a)+maxtime(b)+maxtime(c)+maxtime(d)+maxtime(e);
    sum -= max({rettime(a),rettime(d),rettime(c),rettime(d),rettime(e)})

    cout << sum << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   17 |     sum -= max({rettime(a),rettime(d),rettime(c),rettime(d),rettime(e)})
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
ll ans = 0 , last = 0;
for(ll i = 0; i < 5; i++){
    ll a;
    cin >> a;
    ans += (a + 9) / 10;
    last = max(last, (1000 - a) % 10);
}
cout << ans - last;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'll' was not declared in this scope
    4 | ll ans = 0 , last = 0;
      | ^~
a.cc:5:7: error: expected ';' before 'i'
    5 | for(ll i = 0; i < 5; i++){
      |       ^~
      |       ;
a.cc:5:15: error: 'i' was not declared in this scope
    5 | for(ll i = 0; i < 5; i++){
      |               ^
a.cc:6:7: error: expected ';' before 'a'
    6 |     ll a;
      |       ^~
      |       ;
a.cc:7:12: error: 'a' was not declared in this scope
    7 |     cin >> a;
      |            ^
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans += (a + 9) / 10;
      |     ^~~
      |     abs
a.cc:9:5: error: 'last' was not declared in this scope
    9 |     last = max(last, (1000 - a) % 10);
      |     ^~~~
a.cc:11:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 | cout << ans - last;
      |         ^~~
      |         abs
a.cc:11:15: error: 'last' was not declared in this scope
   11 | cout << ans - last;
      |               ^~~~
Language: C++

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

int main(){
  vector<int> a(5);
  for(int i=0;i<a.size();i++){
    cin >> a.at(i);
  }
  
  int ans = 0;
  int mn = 0;
  int mn_index=0;
  
  vector<int> b(5);
  for(int i=0;i<a.size();i++){
    b.at(i) = a.at(i)%10;
    if(b.at(i) == 0){
      b.at(i) = 10
    }
  }
  
  for(int i=0;i<5;i++){
    mn = min(mn,b.at(i));
  }
  for(int i=0;i<5;i++){
    if( b.at(i) == mn)
      mn_index = i;
  }
  
  for(int i=0;i<5;i++){
   if(i != mn_index){
     ans += (a.at(i)/10+1)*10;
   }else{
     ans += a.at(i)
     
   }
  }
 
  cout << ans << endl;
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: expected ';' before '}' token
   18 |       b.at(i) = 10
      |                   ^
      |                   ;
   19 |     }
      |     ~              
a.cc:34:20: error: expected ';' before '}' token
   34 |      ans += a.at(i)
      |                    ^
      |                    ;
   35 | 
   36 |    }
      |    ~
Language: Java

import java.util.*;

public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);		
		int nextTime = 0;
      	for(int i=0;i<5;i++){
        	nextTime = sc.nextInt(); 
        	if(i!=4) nextTime = Math.ceil(nextTime);
        }
      	System.out.println(nextTime);
    }
}

Compiler output:
Main.java:9: error: incompatible types: possible lossy conversion from double to int
        	if(i!=4) nextTime = Math.ceil(nextTime);
        	                             ^
1 error
Language: C++

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

int main() {
  int a[5],ans=0,min=10;
  for(int i=0; i<5; i++) {
    cin >> a[i];
    ans+=(a[i]+9)/10*10;
    min=min(min,(a[i]-1)%10+1);
  }
  cout << ans-10+min << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'min' cannot be used as a function
    9 |     min=min(min,(a[i]-1)%10+1);
      |         ~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

class A{
public:
    int d[5];
    int min = 0;
    A();
    void decade();
    int jikan();
    int hantei();
};

A::A(){
    int r = 0;
    for (int i = 0; i < 5; i++)
        cin >> d[i];
    for (int i = 0; i < 5; i++) {
        if (min > d[i]) {
            min = d[i];
            r = i;
        }
    }
    d[r] = 0;
}


void A::decade() {
    for (int i = 0; i < 5; i++) {
        if (d[i] % 10)
            d[i] += (10 - d[i] % 10);
    }
}

int hantei() {
    int kekka = 0;
    for (int i = 0; i < 5; i++)
        kekka += d[i];
    kekka += min;
    return kekka; 
}

int main() {
    A str;
    cout << str.hantei() << endl;
    return (0);
}

Compiler output:
a.cc: In function 'int hantei()':
a.cc:38:18: error: 'd' was not declared in this scope
   38 |         kekka += d[i];
      |                  ^
a.cc:39:14: error: overloaded function with no contextual type information
   39 |     kekka += min;
      |              ^~~
Language: Java

import java.util.Scanner;

import java.util.InputMismatchException;

public class FiveDishes{
    public static void main(String args[]){
        int time[] = new int[5];

        try{
            Scanner scanner = new Scanner(System.in);
            for(int i = 0; i < time.length; i++){
                time[i] = scanner.nextInt();
            }
            scanner.close();
        } catch(InputMismatchException e){
            System.out.println(e);
        }

        int extraTimes[] = new int[5];
        int tenTimes[] = new int[5];
        int extraTimesMin = 10;
        int minIndex = 0;
        for(int i = 0; i < extraTimes.length; i++){
            extraTimes[i] = time[i] % 10;
            tenTimes[i] = time[i] / 10;
            if(extraTimes[i] < extraTimesMin && extraTimes[i] != 0){
                extraTimesMin = extraTimes[i];
                minIndex = i;
            }
        }

        int totalTime = 0;
        for(int i = 0; i < time.length; i++){
            if(i != minIndex){
                totalTime += tenTimes[i] * 10;
                if(extraTimes[i] != 0){
                    totalTime += 10;
                }
            }
        }
        totalTime += time[minIndex];
        System.out.println(totalTime);
    }
}


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

#include <studio.h>
 
int main(){
  int a,b,c,d,e;
  scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e);
  int max = 0;
  if((a%10) > (b%10)){ max = a%10;}
  else{max = b%10;}
  if((c%10) > max){ max = c%10; }
  if((d%10) > max){ max = d%10; }
  if((e%10) > max){max = e%10;}
  int ia,ib,ic,id,ie;
  ia = a - (a%10) + 10;
  ib = b - (b%10) + 10;
  ic = c - (c%10) + 10;
  id = d - (d%10) + 10;
  ie = e - (e%10) + 10;
  
  max += ia+ib+ic+id+ie;
  printf("%d",&max);
  
}

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

#include<stdio.h>

int main(void){
  
  int time[5],time_quo[5],time_TT[5]; //TT is Total Time
  int i,sub,result = 0;
  
  for(i = 0;i < 5;i++){
    scanf("%d",&time[i]);
    time_quo[i] = time[i] % 10;
    if(time[i] % 10 == 0){
      time_TT[i] = time[i];
    }else{
      time_TT[i] = ((time[i] / 10) + 1) * 10;
    }
  }
  
  for(i = 0;i < 5;i++){
    result += time_TT[i];
  }
  
  sub = time_quo[0];
  for(i = 0;i < 5;i++){
    if(sub > time_quo[i] && time_quo[i] != 0){
      sub = time_quo[i];
    }
  }
  
  if(result == 0){
    printf("0")
  }else{
    printf("%d",result - 10 + sub);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:30:16: error: expected ';' before '}' token
   30 |     printf("0")
      |                ^
      |                ;
   31 |   }else{
      |   ~
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		// 初期化
		int[] list = new int[5];
		int[] check = {9,0,8,7,6,5,4,3,2,1};a
		
		Scanner sc = new Scanner(System.in);
		list[0] = sc.nextInt();
		list[1] = sc.nextInt();
		list[2] = sc.nextInt();
		list[3] = sc.nextInt();
		list[4] = sc.nextInt();

		int result=0;
		int cnt=1;
		for(int i=0;i<check.length;i++) {
			for(int j=0;j<list.length;j++) {
				int amari = list[j] % 10;
				if(amari == check[i]) {
					if(cnt!=5) {
						if(amari != 0) {
							result += list[j] + 10 - amari;
						}
						else {
							result += list[j];
						}
					}
					else {
						result += list[j];
					}
					cnt++;
				}	
			}
		}
		System.out.println(result);
	}
}

Compiler output:
Main.java:11: error: ';' expected
		Scanner sc = new Scanner(System.in);
		       ^
1 error