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

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int bestTime = INT_MAX;
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int n = 5;
	vector <int > time = {a, b, c, d, e};
	vector <int > nextTime(n);
	for (int i = 0; i < n; i++) {
		if (time[i] % 10 == 0) {
			nextTime[i] = time[i];
		}
		else {
			nextTime[i] = time[i] - time[i] % 10 + 10;
		}
	}
	
	for (int i = 0; i < n; i++) {
		int sumTime = 0;
		for (int j = 0; j < n; j++) {
			if (i == j)
				sumTime += time[j];
			else
				sumTime += nextTime[j];
		}
		bestTime = min(bestTime, sumTime);
	}
	cout << bestTime;
	return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: 'INT_MAX' was not declared in this scope
    6 |         int bestTime = INT_MAX;
      |                        ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int n = 5;
	vector <int > time = {a, b, c, d, e};
	vector <int > nextTime(n);
	for (int i = 0; i < n; i++) {
		if (time[i] % 10 == 0) {
			nextTime[i] = time[i];
		}
		else {
			nextTime[i] = time[i] - time[i] % 10 + 10;
		}
	}
	int bestTime = INT_MAX;
	for (int i = 0; i < n; i++) {
		int sumTime = 0;
		for (int j = 0; j < n; j++) {
			if (i == j)
				sumTime += time[j];
			else
				sumTime += nextTime[j];
		}
		bestTime = min(bestTime, sumTime);
	}
	cout << bestTime;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: 'INT_MAX' was not declared in this scope
   19 |         int bestTime = INT_MAX;
      |                        ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int n = 5;
	vector <int > time = {a, b, c, d, e};
	vector <int > nextTime(n);
	for (int i = 0; i < n; i++) {
		if (time[i] % 10 == 0) {
			nextTime[i] = time[i];
		}
		else {
			nextTime[i] = time[i] - time[i] % 10 + 10;
		}
	}
	int bestTime = INT_MAX;
	for (int i = 0; i < n; i++) {
		int sumTime = 0;
		for (int j = 0; j < n; i++) {
			if (i == j)
				sumTime += time[j];
			else
				sumTime += nextTime[j];
		}
		bestTime = min(bestTime, sumTime);
	}
	cout << bestTime;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:24: error: 'INT_MAX' was not declared in this scope
   19 |         int bestTime = INT_MAX;
      |                        ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <algorithm>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

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

int GetMax(int a,int b, int c, int d, int e){
  if (a>b&&a>c&&a>d&&a>e) return a;
  else if (b>a&&b>c&&b>d&&b>e) return b;
  else if (c>a&&c>b&&c>d&&c>e) return c;
  else if (d>a&&d>c&&d>b&&d>e) return d;
  else if (e>a&&e>c&&e>d&&e>b) return e;
}


int main() {
  int a,b,c,d,e;
  cin >> a >> b >> c >> d >> e;
  
  int A,B,C,D,E
  A = 10-a%10;
  B = 10-b%10;
  C = 10-c%10;
  D = 10-d%10;
  E = 10-e%10;
  
  a = (a/10+1)*10;
   b = (b/10+1)*10;
   c = (c/10+1)*10;
   d = (d/10+1)*10;
   e = (e/10+1)*10;
  
  int ans=0;
  
  if (A>B&&A>C&&A>D&&A>E) {
    ans = a+b+c+d+e-A;
  }
  else if (B>A&&B>C&&B>D&&B>E) {
     ans = a+b+c+d+e-B;
  }
  else if (C>A&&C>B&&C>D&&C>E) {
     ans = a+b+c+d+e-C;
  }
  else if (D>A&&D>C&&D>B&&D>E) {
     ans = a+b+c+d+e-D;
  }
  else if (E>A&&E>C&&E>D&&E>B) {
     ans = a+b+c+d+e-E;
  }
   
  cout << ans << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected initializer before 'A'
   18 |   A = 10-a%10;
      |   ^
a.cc:22:3: error: 'E' was not declared in this scope
   22 |   E = 10-e%10;
      |   ^
a.cc: In function 'int GetMax(int, int, int, int, int)':
a.cc:10:1: warning: control reaches end of non-void function [-Wreturn-type]
   10 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <vector>
#include <functional>
using namespace std;

int findACGT(char c){
  if (c=='A'||c=='C'||c=='T'||c=='G') return 1;
  else return 0;
}

int main() {
  int time[5];
  int q[5];
  for(int i=0;i<5;i++){
    cin >> time[i];
    q[i] = time[i]%10;
  }
  std::sort(q.begin(),q.end());
  int i=0;
  for (;i<5;i++){
    if(time[i]%10==q[4]) break;
  }
  int sum=0;
  for (int j=0;j<5;j++){
    sum+=(q[j]+1)*10;
  }
  cout << sum - ((time[i]%10)+1)*10 + time[i] << endl;
  
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:15: error: request for member 'begin' in 'q', which is of non-class type 'int [5]'
   20 |   std::sort(q.begin(),q.end());
      |               ^~~~~
a.cc:20:25: error: request for member 'end' in 'q', which is of non-class type 'int [5]'
   20 |   std::sort(q.begin(),q.end());
      |                         ^~~
Language: C++

#include <bits/stdc++.h>

#define mod 1000000007

using namespace std;
typedef long long ll; 
 
int main(void){
	
	int A[5], time = 0, mi = 10;
	
	for(int i=0; i<5; i++){
		cin >> A[i];
		if(A[i]%10)
			mi = min(min, A[i]%10);
		time += ceil(A[i]/10) * 10;
	}
	
	cout << time + mi - 10;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:33: error: no matching function for call to 'min(<unresolved overloaded function type>, int)'
   15 |                         mi = min(min, A[i]%10);
      |                              ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:20: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'const int&'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |         ~~~~~~~~~~~^~~
/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:15:33: note:   couldn't deduce template parameter '_Tp'
   15 |                         mi = min(min, A[i]%10);
      |                              ~~~^~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main(){
  int sum,max;
  int dish[5];
  int dishes[5];
  for(int i = 0; i<5; i++){
    scanf("%d", &dish[i]);
    dishes[i] = dish[i] /10;
  }
  for(int j = 0; j<5; j++){
    if(dishes[j] == 0){
    sum += dish[j];
    dishes[j] += 10;
    }
    else if (dishes[j] < dishes[j+1]){
     int temp = dishes[j]
     dishes[j] = dishes[j+1];
     dishes[j+1] = temp;
    
    }
    int max += dishes[j]
  }
  
  printf("%d", sum - max +40);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:6: error: expected ',' or ';' before 'dishes'
   18 |      dishes[j] = dishes[j+1];
      |      ^~~~~~
main.c:22:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+=' token
   22 |     int max += dishes[j]
      |             ^~
main.c:22:13: error: expected expression before '+=' token
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a(5); int ans=0,x=10;
  for (int i=0;i<5;i++) {
    cin >> a[i];
    int n=a[i]%10;
    if(n!=0){
    x=min(x,n);
    }
    ans+=(a[i]+9)/10
  }
  cout << ans-(10-x) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before '}' token
   11 |     ans+=(a[i]+9)/10
      |                     ^
      |                     ;
   12 |   }
      |   ~
Language: C++

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

int main() {
  vector<int> A(5);
  cin >> A.at(0) >> A.at(1) >> A.at(2) >> A.at(3) >> A.at(4);
  vector<int> index = {0, 1, 2, 3, 4};
  int besttime = 1000000000;
  do {
    int nowtime = 0;
    for (i = 0; i < 5; i++) {
      while(nowtime %  10 != 0) nowtime++;
      nowtime += A.at(index.at(i));
    }
    besttime = min(besttime, nowtime);
  } while (next_permutation(index.begin(), index.end()));
  cout << besttime << endl;
  return 0;
}

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

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

int main() {
  vector<int> A(5);
  cin >> A.at(0) >> A.at(1) >> A.at(2) >> A.at(3) >> A.at(4);
  vector<int> index = {0, 1, 2, 3, 4};
  int besttime = 1000000000
  do {
    int nowtime = 0;
    for (i = 0; i < 5; i++) {
      while(nowtime %  10 != 0) nowtime++;
      nowtime += A.at(index.at(i));
    }
    besttime = min(besttime, nowtime);
  } while (next_permutation(index.begin(), index.end()));
  cout << besttime << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'do'
    9 |   do {
      |   ^~
Language: C++

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

int main() {
  int a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  vector<int> A(5);
  A = {a, b, c, d, e};
  vector<int> index(5);
  index = {0, 1, 2, 3, 4};
  int besttime = 0;
  do { for(int i = 0; i < 5; i++) {
    int nowtime = 0;
    while (nowtime % 10 != 0) nowtime++;
    nowtime += A.at(index.at(i));
    besttime = min(besttime, nowtime);
    {
  }while (next_permutation(index.begin(), index.end()));
  cout << besttime << endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:12:6: note: to match this '{'
   12 |   do { for(int i = 0; i < 5; i++) {
      |      ^
a.cc:20:4: error: expected 'while' at end of input
   20 |   }
      |    ^
a.cc:20:4: error: expected '(' at end of input
   20 |   }
      |    ^
      |    (
a.cc:20:4: error: expected primary-expression at end of input
a.cc:20:4: error: expected ')' at end of input
   20 |   }
      |    ^
      |    )
a.cc:20:4: error: expected ';' at end of input
   20 |   }
      |    ^
      |    ;
a.cc:20:4: error: expected '}' at end of input
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
    int a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    int preans;
    preans = min({(a-1)%10, (b-1)%10, (c-1)%10, (d-1)%10, (e-1)%10});
    preans += 1;

    int ans = 0;
    ans += 5+ a/10 + b/10 + c/10 + d/10 + e/10;
    ans *= 10;
    ans += preans;
    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
    9 |     preans = min({(a-1)%10, (b-1)%10, (c-1)%10, (d-1)%10, (e-1)%10});
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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: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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

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

int amari(int &x) {
  return x % 10;
}
int tens(int &x) {
  return x / 10 * 10;
}
int main() {
  int A, B, C, D, E;
  cin >> A >> B >> C >> D >> E;
  int a = amari(A);
  int b = amari(B);
  int c = amari(C);
  int d = amari(D);
  int e = amari(E);
  int plus10 = 0;
  vector<int> amaris(5) = {a, b, c, d, e};
  for (int x: amaris) {
    if (x != 0) {
      plus10++;
    }
  }
  int minus = max({a, b, c, d, e});
  int ans = tens(A) + tens(B) + tens(C) + tens(D) + tens(E)
    + plus10 * 10 - minus;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: expected ',' or ';' before '=' token
   19 |   vector<int> amaris(5) = {a, b, c, d, e};
      |                         ^
Language: C++

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

int amari(int &x) {
  return x % 10;
}
int tens(int &x) {
  return x / 10 * 10;
}
int main() {
  int A, B, C, D, E;
  cin >> A >> B >> C >> D >> E;
  int a = amari(A);
  int b = amari(B);
  int c = amari(C);
  int d = amari(D);
  int e = amari(E);
  int plus10 = 0;
  vector<int> amaris(5) = {a, b, c, d, e};
  for (int x: amaris) {
    if (x != 0) {
      plus10++;
    }
  }
  int minus = max({a, b, c, d, e});
  int ans = tens(A) + tens(B) + tens(C) + tens(D) + tens(E)
    + plus10 * 10 - minus;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incude; did you mean #include?
    1 | #incude <bits/stdc++.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:12:3: error: 'cin' was not declared in this scope
   12 |   cin >> A >> B >> C >> D >> E;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incude <bits/stdc++.h>
a.cc:19:3: error: 'vector' was not declared in this scope
   19 |   vector<int> amaris(5) = {a, b, c, d, e};
      |   ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #incude <bits/stdc++.h>
a.cc:19:10: error: expected primary-expression before 'int'
   19 |   vector<int> amaris(5) = {a, b, c, d, e};
      |          ^~~
a.cc:20:15: error: 'amaris' was not declared in this scope; did you mean 'amari'?
   20 |   for (int x: amaris) {
      |               ^~~~~~
      |               amari
a.cc:25:15: error: 'max' was not declared in this scope
   25 |   int minus = max({a, b, c, d, e});
      |               ^~~
a.cc:28:3: error: 'cout' was not declared in this scope
   28 |   cout << ans << endl;
      |   ^~~~
a.cc:28:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:18: error: 'endl' was not declared in this scope
   28 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incude <bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a(5); int ans=0,x=10;
  for (int i=0;i<5;i++) {
    cin >> a[i];
    if(a[i]!=0)
    int n=a[i]%10;
    x=min(x,n);
    ans+=(a[i]/10)*10+10;
  }
  cout << ans-(10-x) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'n' was not declared in this scope
    9 |     x=min(x,n);
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod=1e9+7;

int main(){
#include <bits/stdc++.h>

using namespace std;

int main(){
    int diffMax = 0;
    int ans = 0;
    for (int i = 0; i < 5; ++i) {
        int a;
        cin >> a;

        int aa = ((a + 9) / 10) * 10;
        ans += aa;
        diffMax = max(diffMax, aa - a);
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   11 | int main(){
      |         ^~
a.cc:11:9: note: remove parentheses to default-initialize a variable
   11 | int main(){
      |         ^~
      |         --
a.cc:11:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:11:11: error: a function-definition is not allowed here before '{' token
   11 | int main(){
      |           ^
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

S = 0
mns = 0
for i in range(5):
    tmp = int(input())
    S += (tmp + 9) // 10 * 10
    if tmp % 10:
        mns = max(10 - tmp % 10, mns)
print(S - mns)


Compiler output:
a.cc:1:1: error: 'S' does not name a type
    1 | S = 0
      | ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int k=9,s=0,k;
  for(int j=0;j<5;j++){
    int a; cin>>a;
    if(a%10==0) s += a;
    else if(a%10<=k%10){
      k=a;
      s += a/10*10 +10;
    }
    else s += a/10*10 +10;
  }
  
  s = s -k/10*10 + k;
  cout<<s<<endl;
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: redeclaration of 'int k'
    5 |   int k=9,s=0,k;
      |               ^
a.cc:5:7: note: 'int k' previously declared here
    5 |   int k=9,s=0,k;
      |       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int k=9,s-0,k;
  for(int j=0;j<5;j++){
    int a; cin>>a;
    if(a%10==0) s += a;
    else if(a%10<=k%10){
      k=a;
      s += a/10*10 +10;
    }
    else s += a/10*10 +10;
  }
  
  s = s -k/10*10 + k;
  cout<<s<<endl;
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: expected initializer before '-' token
    5 |   int k=9,s-0,k;
      |            ^
a.cc:8:17: error: 's' was not declared in this scope
    8 |     if(a%10==0) s += a;
      |                 ^
a.cc:11:7: error: 's' was not declared in this scope
   11 |       s += a/10*10 +10;
      |       ^
a.cc:13:10: error: 's' was not declared in this scope
   13 |     else s += a/10*10 +10;
      |          ^
a.cc:16:3: error: 's' was not declared in this scope
   16 |   s = s -k/10*10 + k;
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int gaus(int x){
  if(x %10 ==0){
    return x;
  }
  else{
    return x +(10-x%10);
  }
}
int abs(int x, int y) {
  if (x < y) {
    return y-x;
  }
  else{
    return x-y;
  }
}
int main(){
  vector<int> unko(5);
  for(int i=0;i<5;i++){
    cin>>unko.at(i);
  }
  int last =unko.at(4);
  for(int i=0;i<4;i++){
    for(int j =i+1; j<5;j++){
      if(min(unko.at(i)%10 ,unko.at(j)%10) != 0){
        if(min(unko.at(i)%10 ,unko.at(j)%10)<=last){
          last = min(unko.at(i)%10 ,unko.at(j)%10);
        }
      }
    }
  }
  int answer =0;
  for(int i=0;i<5;i++){
    answer += gaus(unko.at(i));
  }
  if(unko.at(0)%10 ==0 && unko.at(1)%10 == 0 && unko.at(2)%10 ==0 && unko.at(3)%10 ==0 && unko.at(4)%10 ==0){
    cout <<ansuwer<<endl;
  }
  else{
    cout<<answer-10 +last<<endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
bool f(int l, int r){
    return l%10 > r%10;
}
int main(){
    vector<int> a;
    for(int i = 0; i < 5; i++){#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
bool f(int l, int r){
    return l%10 > r%10;
}
int main(){
    vector<int> a;
    for(int i = 0; i < 5; i++){
        int x;
         cin >> x;
         a.pb(x);
    }
    int s = 0;
    for(int i = 0; i < a.size(); i++){
       if(a[i]%10 == 0) {
           s += a[i];
           a.erase(a.begin() + i);
           i--;
       }
    }
    if(a.size() != 0) {
        sort(a.begin(), a.end(), f);
    for(int i = 0; i < a.size()-1; i++){
        s += a[i] + 10 - a[i]%10;        
    }
        cout << s + a[a.size()-1];
    }
    else cout << s;
}
        int x;
         cin >> x;
         a.pb(x);
    }
    int s = 0;
    for(int i = 0; i < 5; i++){
       if(a[i]%10 == 0) s += a[i];
    }
    sort(a.begin(), a.end(), f);
    a.pb(0);
    for(int i = 0; i < 5; i++){
        if(a[i+1]%10 != 0) s += a[i] / 10 * 10 + 10;
        else{
            s += a[i];
            break;
        }
    }
    cout << s;
}

Compiler output:
a.cc:12:32: error: stray '#' in program
   12 |     for(int i = 0; i < 5; i++){#include <bits/stdc++.h>
      |                                ^
a.cc: In function 'int main()':
a.cc:12:33: error: 'include' was not declared in this scope
   12 |     for(int i = 0; i < 5; i++){#include <bits/stdc++.h>
      |                                 ^~~~~~~
a.cc:12:42: error: 'bits' was not declared in this scope
   12 |     for(int i = 0; i < 5; i++){#include <bits/stdc++.h>
      |                                          ^~~~
a.cc:12:47: error: 'stdc' was not declared in this scope; did you mean 'std'?
   12 |     for(int i = 0; i < 5; i++){#include <bits/stdc++.h>
      |                                               ^~~~
      |                                               std
a.cc:13:1: error: expected primary-expression before 'using'
   13 | using namespace std;
      | ^~~~~
a.cc:18:21: error: a function-definition is not allowed here before '{' token
   18 | bool f(int l, int r){
      |                     ^
a.cc:21:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   21 | int main(){
      |         ^~
a.cc:21:9: note: remove parentheses to default-initialize a variable
   21 | int main(){
      |         ^~
      |         --
a.cc:21:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:21:11: error: a function-definition is not allowed here before '{' token
   21 | int main(){
      |           ^
Language: C++

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

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

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

int main(){
  int a[5],sum=0,ans;
  for(int i=0; i<5; i++){
    cin >> a[i];
  }
  for(int i=0; i<5; i++){
    sum += maxtime(a[i]);
  }
  ans = sum-max(remtime(a[0]),remtime(a[1]),remtime(a[2]),remtime(a[3]),remtime(a[4]));
                cout << ans << endl;
                }
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: no matching function for call to 'max(int, int, int, int, int)'
   20 |   ans = sum-max(remtime(a[0]),remtime(a[1]),remtime(a[2]),remtime(a[3]),remtime(a[4]));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: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, 5 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, 5 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 5 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 5 provided
Language: C++

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

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

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

int main(){
  int a[5],sum=0,ans;
  for(int i=0; i<5; i++){
    cin >> a[i];
  }
  for(int i=0; i<5; i++){
    sum += maxtime(a[i]);
  }
  ans = sum-max(remtime(a[0]),remtime(a[1]),remtime(a[2)],remtime(a[3]),remtime(a[4]));
                cout << ans << endl;
                }
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:20:56: error: expected ']' before ')' token
   20 |   ans = sum-max(remtime(a[0]),remtime(a[1]),remtime(a[2)],remtime(a[3]),remtime(a[4]));
      |                                                        ^
      |                                                        ]
a.cc:20:57: error: expected ')' before ']' token
   20 |   ans = sum-max(remtime(a[0]),remtime(a[1]),remtime(a[2)],remtime(a[3]),remtime(a[4]));
      |                ~                                        ^
      |                                                         )
Language: C++

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

int main(){
  int A[5], sp;
  vector<pair<int,int>> diff(5);
  for (int i =0;i < 5;i++)
  {
    cin >> A[i];
  }
  for(int i = 0;i<5;i++)
  {
    sp = A[i] - (A[i]/10)*10;
    diff[i].first = sp;
    if(sp == 0)
    {
      diff[i].second = A[i]/10;
    }
    else
    {
      diff[i].second = A[i]/10 + 1;
    }

  }

  sort(diff.begin(),diff.end());

  int total = 0;

  bool flag = true;

  for (int i = 0;i < 5;i++)
  {
    if(diff[i].first == 0)
    {
      total += diff[i].second * 10;
    }
    else
    {
      if(flag == true)
      {
        flag = false;
        int num = i;
      }
      else{
        total += diff[i].second * 10;
      }
    }

  }

  total += (diff[num].second-1)*10 + diff[num].first;

  cout << total;
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:18: error: 'num' was not declared in this scope; did you mean 'enum'?
   54 |   total += (diff[num].second-1)*10 + diff[num].first;
      |                  ^~~
      |                  enum
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main(){
    vector<int> lunch(5);
    for(int i = 0; i < 5; i++){
        cin >> lunch[i];
    }

    int sum = 1e9;
    do{

        int ans = 0;
        for(int i = 0; i < 5; i++){
            while(ans % 10 != 0) ans++;
            ans += lunch[i];
        }

        sum = min(sum,ans);
    }while (next_permutation(lunch.begin(),lunch.end()));

    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: 'next_permutation' was not declared in this scope
   22 |     }while (next_permutation(lunch.begin(),lunch.end()));
      |             ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
    int lunch[5];
    for(int i = 0; i < 5; i++){
        cin >> lunch[i];
    }

    int sum = 1e9;
    do{

        int ans = 0;
        for(int i = 0; i < 5; i++){
            while(ans % 10 != 0) ans++;
            ans += lunch[i];
        }

        sum = min(sum,ans);
    }while (next_permutation(lunch,lunch+5));

    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:13: error: 'next_permutation' was not declared in this scope
   21 |     }while (next_permutation(lunch,lunch+5));
      |             ^~~~~~~~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
    int lunch[5];
    for(int i = 0; i < 5; i++){
        cin >> lunch[i];
    }

    int sum = 1e9;
    do{

        int ans = 0;
        for(int i = 0; i < 5; i++){
            while(ans % 10 != 0) ans++;
            ans += lunch[i];
        }

        sum = min(sum,ans);
    }while(next_permutation(lunch,lunch+5));

    cout << sum << endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:12: error: 'next_permutation' was not declared in this scope
   21 |     }while(next_permutation(lunch,lunch+5));
      |            ^~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>
int main()
{
	int D[5], k;
	
	int min = 9;
	int sum = 0;
	
	scanf("%d", &D[0]);
	scanf("%d", &D[1]);
	scanf("%d", &D[2]);
	scanf("%d", &D[3]);
	scanf("%d", &D[4]);
	
	for(k=0; k<5; k++){
		if(D[k] % 10 < min){
			min = D[k] % 10;
		}
	}
	
	for(k=0; k<5; k++){
		sum = sum + D[k]
	}
	
	printf("%d", sum - min);
	
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:33: error: expected ';' before '}' token
   22 |                 sum = sum + D[k]
      |                                 ^
      |                                 ;
   23 |         }
      |         ~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  int a[5], ans=0, res=0;
  for(int i=0; i<5; i++){
  cin >> a[i];
  ans+=10*ceil(a[i]/10);
  if(res<10*ceil(a[i]/10)-a[i])
    res=10*ceil(a[i]/10)-a[i];
  

  cout << ans-res;
  return 0;
}


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

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  int a[5], ans=0;
  for(int i=0; i<5; i++){
  cin >> a[i];
  ans+=10*ceil(a[i]/10);
  

  cout << ans;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  vector<int>a(5);
  pair<int, int>b[5];
  
  for(int i = 0; i < 5; i++){
    cin >> a.at(i);
    c = a.at(i) / 10;
    d = a.at(i) % 10;
    b[i] = make_pair(d, c);    
  }
  
  sort(b, b+5);
  
  int ans;
  ans = b[0].second + c[0].first;
  for(int i = 1; i < 5; i++){
    ans = ans + b.first(i) + 10
  }
  cout << ans << endl;
}

  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'c' was not declared in this scope
   10 |     c = a.at(i) / 10;
      |     ^
a.cc:11:5: error: 'd' was not declared in this scope
   11 |     d = a.at(i) % 10;
      |     ^
a.cc:18:23: error: 'c' was not declared in this scope
   18 |   ans = b[0].second + c[0].first;
      |                       ^
a.cc:20:19: error: request for member 'first' in 'b', which is of non-class type 'std::pair<int, int> [5]'
   20 |     ans = ans + b.first(i) + 10
      |                   ^~~~~
Language: C++

#!/bin/sh

#とりあえず毎回コンソールに貼り付けなくてよければよしとするか
program=~/atcoder/abc/123/b.out
result=$(${program} <<EOS
29
20
7
35
120
EOS
)
echo "${result}"
echo "----------"

result=$(${program} <<EOS
101
86
119
108
57
EOS
)
echo "${result}"
echo "----------"

result=$(${program} <<EOS
123
123
123
123
123
EOS
)
echo "${result}"
echo "----------"


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/bin/sh
      |  ^
a.cc:3:2: error: invalid preprocessing directive #\U00003068\U0000308a\U00003042\U00003048\U0000305a\U00006bce\U000056de\U000030b3\U000030f3\U000030bd\U000030fc\U000030eb\U0000306b\U00008cbc\U0000308a\U00004ed8\U00003051\U0000306a\U0000304f\U00003066\U00003088\U00003051\U0000308c\U00003070\U00003088\U00003057\U00003068\U00003059\U0000308b\U0000304b
    3 | #とりあえず毎回コンソールに貼り付けなくてよければよしとするか
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:4:1: error: 'program' does not name a type
    4 | program=~/atcoder/abc/123/b.out
      | ^~~~~~~
a.cc:5:21: error: expected unqualified-id before '<<' token
    5 | result=$(${program} <<EOS
      |                     ^~
a.cc:16:21: error: expected unqualified-id before '<<' token
   16 | result=$(${program} <<EOS
      |                     ^~
a.cc:27:21: error: expected unqualified-id before '<<' token
   27 | result=$(${program} <<EOS
      |                     ^~
Language: C

#include<stdio.h>
int main(void){
  int x[5],S=0;
  for(int i=0;i<5;i++){
    scanf("%d",&x[i]);
  }
  for(int i=0;i<4;i++){
    x[i]/=10;
    x[i]+=1;
    x[i]*=10;
    S+=x[i];
  }
  S+=[4];
  printf("%d\n",S);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:6: error: expected expression before '[' token
   13 |   S+=[4];
      |      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)%10!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
  }
  
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.size();j++){
      if((vec.at(j)%10!=0&&vec.at(j)%10!=min)||(vec.at(j)%10==min&&sum4>0)){
        sum1+=vec.at(j);
        
        sum2+=vec.at(j)%10;
        
        sum3++;
      }
      else if(vec.at(j)%10==min&&sum4==0){
        sum1+=vec.at(j);
        sum4++;
      }
      else if(vec.at(j)%10==0){
        sum1+=vec.at(j)
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }

    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:32:24: error: expected ';' before '}' token
   32 |         sum1+=vec.at(j)
      |                        ^
      |                        ;
   33 | 
   34 |     }
      |     ~                   
a.cc:36:4: error: expected '}' at end of input
   36 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
  }
  
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if(((vec.at(j)%10!=0)&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
        sum1+=vec.at(j);
        
        sum2+=vec.at(j)%10;
        
        sum3++;
      }
      else if(vec.at(j)==min&&sum4==0){
        sum1+=vec.at(j);
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }

    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:19:26: error: 'i' was not declared in this scope
   19 |     for(int j=0;j<vec.at(i);j++){
      |                          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if(((vec.at(j)%10!=0)&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
        sum+=vec.at(j);
        
        sum2+=vec.at(j)%10;
        
        sum3++;
      }
      else if(vec.at(j)==min&&sum4==0){
        sum1+=vec.at(j);
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }

    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'sum' was not declared in this scope; did you mean 'sum4'?
   19 |         sum+=vec.at(j);
      |         ^~~
      |         sum4
a.cc:31:4: error: expected '}' at end of input
   31 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=(vec.at(i)%10)){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
        sum+=vec.at(j);
        
        sum2+=vec.at(j)%10;
        
        sum3++;
      }
      else if(vec.at(j)==min&&sum4==0){
        vec.at(j)+=sum1;
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
}
    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ')' before '!' token
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |           ~            ^
      |                        )
a.cc:24:8: error: expected ')' before 'else'
   24 |       }
      |        ^
      |        )
   25 |       else if(vec.at(j)==min&&sum4==0){
      |       ~~~~
a.cc:18:10: note: to match this '('
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |          ^
a.cc:27:8: error: expected ')' before '}' token
   27 |       }
      |        ^
      |        )
   28 | 
   29 |     }
      |     ~   
a.cc:18:9: note: to match this '('
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |         ^
a.cc:29:5: error: expected primary-expression before '}' token
   29 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=(vec.at(i)%10)){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
        vec.at(j)+=sum1;
        int a=(vec.at(j)%10);
        a+=sum2;
        sum3++;
      }
      else if(vec.at(j)==min&&sum4==0){
        vec.at(j)+=sum1;
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
}
    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: expected ')' before '!' token
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |           ~            ^
      |                        )
a.cc:23:8: error: expected ')' before 'else'
   23 |       }
      |        ^
      |        )
   24 |       else if(vec.at(j)==min&&sum4==0){
      |       ~~~~
a.cc:18:10: note: to match this '('
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |          ^
a.cc:26:8: error: expected ')' before '}' token
   26 |       }
      |        ^
      |        )
   27 | 
   28 |     }
      |     ~   
a.cc:18:9: note: to match this '('
   18 |       if(((vec.at(j)%10!)=0&&(vec.at(j)%10)!=min)&&(vec.at(j)==min&&sum4>0)){
      |         ^
a.cc:28:5: error: expected primary-expression before '}' token
   28 |     }
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if((vec.at(j)%10!=0&&vec.at(j)%10!=min)&&(vec.at(j)==min&&sum4>0)){
        vec.at(j)+=sum1;
        int a=vec.at(j)%10;
        a+=sum2;
        sum3++;
      }
      else if(vec.at(j)==min&&sum==0){
        vec.at(j)+=sum1;
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
}
    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:24:31: error: 'sum' was not declared in this scope; did you mean 'sum4'?
   24 |       else if(vec.at(j)==min&&sum==0){
      |                               ^~~
      |                               sum4
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    int sum4=0;
    for(int j=0;j<vec.at(i);j++){
      if((vec.at(j)%10!=0&&vec.at(j)%10!=min)&&(vec.at(j)==min&&sum>0)){
        vec.at(j)+=sum1;
        int a=vec.at(j)%10;
        a+=sum2;
        sum3++;
      }
      else if(vec.at(j)==min&&sum==0){
        vec.at(j)+=sum1;
      }
    
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
}
    
          


Compiler output:
a.cc: In function 'int main()':
a.cc:18:65: error: 'sum' was not declared in this scope; did you mean 'sum4'?
   18 |       if((vec.at(j)%10!=0&&vec.at(j)%10!=min)&&(vec.at(j)==min&&sum>0)){
      |                                                                 ^~~
      |                                                                 sum4
Language: C++

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

int main(){
  vector<double> d(5);
  int ans = 0;
  int minm = 100;
  for(int i=0;i<5;i++){
    cin>>d.at(i);
    ans += ceil(d.at(i)/10)*10;
    if(d.at(i)%10 == 0){
      continue;
    }
    minm = min(minm,d.at(i)%10);
  }
  ans -= 10-minm;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
   11 |     if(d.at(i)%10 == 0){
      |        ~~~~~~~^~~
      |            |   |
      |            |   int
      |            __gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}
a.cc:14:28: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type' {aka 'double'} and 'int' to binary 'operator%'
   14 |     minm = min(minm,d.at(i)%10);
      |                     ~~~~~~~^~~
      |                         |   |
      |                         |   int
      |                         __gnu_cxx::__alloc_traits<std::allocator<double>, double>::value_type {aka double}
Language: C++

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

int main(){
  int a,b,c,d,e;
  cin >>a >>b >>c >>d >>e;
  int ans=0;
  int arest = 10 - a%10;
  int brest = 10 - b%10;
  int crest = 10 - c%10;
  int drest = 10 - d%10;
  int erest = 10 - e%10;
  int extra = max(arest,max(brest,max(crest,mac(drest,erest))));
  ans = a+b+c+d+e+arest+brest+crest+drest+erest-extra;
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:45: error: 'mac' was not declared in this scope
   13 |   int extra = max(arest,max(brest,max(crest,mac(drest,erest))));
      |                                             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    for(int j=0;j<vec.at(i);j++){
      if(vec.at(j)%10!=0&&vec.at(j)%10!=min){
        vec.at(j)+=sum1;
        int a=vec.at(j)%10;
        a+=sum2;
        sum3++;
      }
      else{
        vec.at(j)+=sum1;
      }
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
  
    
          

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int min=10;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&min>=vec.at(i)%10){
      min=vec.at(i)%10;
    }
    int sum1=0;
    int sum2=0;
    int sum3=0;
    for(int j=0;j<vec.at(i);j++){
      if(vec.at(j)%10!=0&&vec.at(j)%10!=min){
        vec.at(j)+=sum1;
        int a=vec.at(j)%10;
        a+=sum2;
        sum++;
      }
      else{
        vec.at(j)+=sum1;
      }
    }
    cout<<sum1+10*sum3-sum2<<endl;
  }
  
    
          

Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: 'sum' was not declared in this scope; did you mean 'sum3'?
   21 |         sum++;
      |         ^~~
      |         sum3
a.cc:28:4: error: expected '}' at end of input
   28 |   }
      |    ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int max=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)%10!=0&&max<=10-vec.at(i)%10){
      max=10-vec.at(i)%10;
    }
  }
   int sum1=0;
  int sum2=0;
  int sum3=0;
  for(int i=0;i<vec.size();i++){
    if((10-vec.at(i)%10)!=max&&vec.at(i)%10!=0){
     int a=vec.at(i)%10;
     a+=sum2;
        sum3++;
      vec.at(i)+=sum1
      }
    else {
      
        vec.at(i)+=sum1;
    }
    
  }
  cout<<10*sum3-sum2+sum1<<endl;
}

  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:22:22: error: expected ';' before '}' token
   22 |       vec.at(i)+=sum1
      |                      ^
      |                      ;
   23 |       }
      |       ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int max=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)%10!=0&&max<=10-vec.at(i)%10){
      max=10-vec.at(i)%10;
    }
  }
   int sum1=0;
  int sum2=0;
  int sum3=0;
  for(int i=0;i<vec.size();i++){
    if((10-vec.at(i)%10)!=max&&vec.at(i)%10!=0){
     int a=vec.at(i)%10;
     a+=sum2;
        sum3++;
      }
    else (vec.at(i)%10!=0){
      
        vec.at(i)+=sum1;
    }
    
  }
  cout<<10*sum3-sum2+sum1<<endl;
}

  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:23:27: error: expected ';' before '{' token
   23 |     else (vec.at(i)%10!=0){
      |                           ^
      |                           ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int max=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=0&&max<=10-vec.at(i)%10){
      max=vec.at(i);
    }
  }
   int sum1=0;
  int sum2=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)!=max){
     int a=vec.at(i)%10;
      if(a!=0){
     (10-a)+=sum2;
      }
      
        vec.at(i)+=sum1;
    }
    else if(vec.at(i)==max){
      vec.at(i)+=sum1;
  }
  }
  cout<<sum2+sum1+max<<endl;
}

  
      

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: lvalue required as left operand of assignment
   20 |      (10-a)+=sum2;
      |      ~~~^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int A,B,C,D,E;
  cin>>A>>B>>C>>D>>E;
  
vector<int>vec={A,B,C,D,E};
  int max=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)%10!=0&&max<=vec.at(i)%10){
      max=vec.at(i);
    }
  }
   int sum1=0;
  int sum2=0;
  for(int i=0;i<vec.size();i++){
    if(vec.at(i)%10!=max){
     int a=vec.at(i)%10;
     a+=sum2;
        vec.at(i)+=sum1;
    }
    else if(vec.at(i)%10==max){
      vec.at(i)+=sum1;
  }
  cout<<40-sum2+sum1+max<<endl;
}

  
      

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