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

#include<bits/stdc++.h>
using namespace std;
int main(){
vector<int> A(5);
  for(int i=0;i<5;i++){
  cin>>A[i];
    a[i]=(10-A[i]%10)*-1;
   
    
    
  }
  int count=0;
  A[i]=a[i];
  sort(a[i],a+5);
  for(int i=0;i<N;i++){
    count+=A[i];
  }
  
cout<<count<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'a' was not declared in this scope
    7 |     a[i]=(10-A[i]%10)*-1;
      |     ^
a.cc:13:5: error: 'i' was not declared in this scope
   13 |   A[i]=a[i];
      |     ^
a.cc:13:8: error: 'a' was not declared in this scope
   13 |   A[i]=a[i];
      |        ^
a.cc:15:17: error: 'N' was not declared in this scope
   15 |   for(int i=0;i<N;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
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: In function 'int main()':
a.cc:7:28: error: 'inf' was not declared in this scope; did you mean 'ynf'?
    7 |         int final_answer = inf;
      |                            ^~~
      |                            ynf
Language: C++

import java.io.PrintWriter
import kotlin.math.min

fun main() {
    PrintWriter(System.out).use { out ->
        solve(out)
        out.flush()
    }
}


fun solve(out: PrintWriter) {
    val a = Array(5) {
        readInteger()
    }
    val aaa = permutationListFrom(a)
    var ans = Int.MAX_VALUE
    for (ab in aaa) {
        var cur = 0
        var i = 0
        for (abb in ab) {
            cur += abb
            cur += if (cur % 10 == 0 || i == 4) 0 else 10 - cur % 10
            i++
        }

        ans = min(ans, cur)
    }
    println(ans)

}

/** O((array.size)!) */
fun <T : Comparable<T>> permutationListFrom(array: Array<T>): List<Array<T>> {
    val current = array.copyOf()
    val permutationList = mutableListOf<Array<T>>()
    do { permutationList += current.copyOf() } while (nextPermutation(current))
    return permutationList
}

/** O(n): n = currentPermutation.size */
fun <T : Comparable<T>> nextPermutation(currentPermutation: Array<T>): Boolean {
    fun <T> Array<T>.reverse(start: Int, end: Int) {
        val midPoint = ((start + end) / 2) - 1
        if (midPoint < 0) return
        var reverseIndex = end - 1
        for (index in start..midPoint) {
            val tmp = this[index]
            this[index] = this[reverseIndex]
            this[reverseIndex] = tmp
            reverseIndex--
        }
    }

    val n = currentPermutation.size
    var i = n - 2
    while (i >= 0) {
        if (currentPermutation[i] < currentPermutation[i + 1]) break
        i--
    }
    if (i < 0) return false
    var j = n
    do { j-- } while (currentPermutation[i] > currentPermutation[j])
    if (currentPermutation[i] < currentPermutation[j]) {
        val tmp = currentPermutation[i]
        currentPermutation[i] = currentPermutation[j]
        currentPermutation[j] = tmp
        currentPermutation.reverse(i + 1, n)
        return true
    }
    return false
}

fun readInteger() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readStringList() = readLine()!!.split(" ")
fun readIntegerList() = readStringList().map(String::toInt)
fun readLongList() = readStringList().map(String::toLong)
fun readDoubleList() = readStringList().map(String::toDouble)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: 'fun' does not name a type
   12 | fun solve(out: PrintWriter) {
      | ^~~
a.cc:34:1: error: 'fun' does not name a type
   34 | fun <T : Comparable<T>> permutationListFrom(array: Array<T>): List<Array<T>> {
      | ^~~
a.cc:42:1: error: 'fun' does not name a type
   42 | fun <T : Comparable<T>> nextPermutation(currentPermutation: Array<T>): Boolean {
      | ^~~
a.cc:74:1: error: 'fun' does not name a type
   74 | fun readInteger() = readLine()!!.toInt()
      | ^~~
Language: C++

A = [int(input()) for i in range(5)]
# A = [101, 86, 119, 108, 57]
# A = [29, 20, 7, 35, 120]
# A = [123, 123, 123, 123, 123]
B = [(10-a % 10) % 10 for a in A]
C = [-(-a//10)*10 for a in A]
print(sum(C)-max(B))


Compiler output:
a.cc:2:3: error: invalid preprocessing directive #A
    2 | # A = [101, 86, 119, 108, 57]
      |   ^
a.cc:3:3: error: invalid preprocessing directive #A
    3 | # A = [29, 20, 7, 35, 120]
      |   ^
a.cc:4:3: error: invalid preprocessing directive #A
    4 | # A = [123, 123, 123, 123, 123]
      |   ^
a.cc:1:1: error: 'A' does not name a type
    1 | A = [int(input()) for i in range(5)]
      | ^
Language: Java

import java.util.function.Function;
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int[] t = new int[5];
        int[] p = new int[5];
        int min = 700;
        for (int i = 0; i < 5; i++) {
            t[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < 5; i++) {
            p[i] = i;
        }
        Function<Integer, Integer> order = (i) -> t[i] % 10 == 0 ? t[i] : t[i] + (10 - (t[i] % 10));
        
        do {
            int sum = 0;
            for (int i = 0; i < 4; i++) {
                sum += order.apply(p[i]);
            }
            sum += t[p[4]];
            min = Math.min(min, sum);
        } while (nextPermutation(p));
        
        out.println(min);
        
        out.flush();
    }
}

Compiler output:
Main.java:27: error: cannot find symbol
        } while (nextPermutation(p));
                 ^
  symbol:   method nextPermutation(int[])
  location: class Main
1 error
Language: Java

import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int[] t = new int[5];
        int[] p = new int[5];
        int min = 700;
        for (int i = 0; i < 5; i++) {
            t[i] = Integer.parseInt(sc.next());
        }
        for (int i = 0; i < 5; i++) {
            p[i] = i;
        }
        Function<Integer, Integer> order = (i) -> t[i] % 10 == 0 ? t[i] : t[i] + (10 - (t[i] % 10));
        
        do {
            int sum = 0;
            for (int i = 0; i < 4; i++) {
                sum += order.apply(p[i]);
            }
            sum += t[p[4]];
            min = Math.min(min, sum);
        } while (nextPermutation(p));
        
        out.println(min);
        
        out.flush();
    }
}

Compiler output:
Main.java:17: error: cannot find symbol
        Function<Integer, Integer> order = (i) -> t[i] % 10 == 0 ? t[i] : t[i] + (10 - (t[i] % 10));
        ^
  symbol:   class Function
  location: class Main
Main.java:26: error: cannot find symbol
        } while (nextPermutation(p));
                 ^
  symbol:   method nextPermutation(int[])
  location: class Main
2 errors
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
 
using namespace std;
 
typedef long long ll;
#define L(ID) ((ID*2)+1)
#define R(ID) ((ID*2)+2)
#define M(L,R) ((L+R)/2)
#define forr(start,end) for(int i = start; i < end; i++)
#define gap ' '

const int MAXN = 200;
//ll a[MAXN], ST[MAXN * 4], LZ[MAXN*4];

/*bool perfectSquare(ll x){
    ll s = sqrt(x);
    if(s *s == x) return true;
    else return false;
}*/

int main() { 
    vector<int> dishes(5);
    for(int i = 0; i < 5; ++i){
        cin >> dishes[i];
    }
    int sum = 0;
    for(int i = 0; i < 5; ++i){
        sum+=(dishes[i] + 9) /10 * 10;
    }
    int time = INT_MAX;
    for(int i = 0; i < 5; ++i){
        int t = sum - (dishes[i] + 9) /10 *10 +dishes[i];
        time = min(time,t);
    }
    cout << time << endl;

    // 29 20 7 35 120
    // sum = 220
    
  
    return 0; 
} 


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long A,B,C,D,E,T;
  cin >> A >> B >> C >> D >> E;
  cout << A+B+C+D+E-(A%10+B%10+C%10+D%10+E%10)+41+min(min((A-1)%10,(B-1)%10),min(min((C-1)%10,(D-1)%10),(E-1)%10);
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:114: error: expected ')' before ';' token
    7 |   cout << A+B+C+D+E-(A%10+B%10+C%10+D%10+E%10)+41+min(min((A-1)%10,(B-1)%10),min(min((C-1)%10,(D-1)%10),(E-1)%10);
      |                                                      ~                                                           ^
      |                                                                                                                  )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long A,B,C,D,E,T;
  cin >> A >> B >> C >> D >> E;
  cout << A+B+C+D+E-(A%10+B%10+C%10+D%10+E%10)+41+min(min((A-1)%10,(B-1)%10),min(min((C-1)%10,(D-1)%10)),(E-1)%10);
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:81: error: no matching function for call to 'min(const long long int&)'
    7 |   cout << A+B+C+D+E-(A%10+B%10+C%10+D%10+E%10)+41+min(min((A-1)%10,(B-1)%10),min(min((C-1)%10,(D-1)%10)),(E-1)%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: '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
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:   template argument deduction/substitution failed:
a.cc:7:81: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
    7 |   cout << A+B+C+D+E-(A%10+B%10+C%10+D%10+E%10)+41+min(min((A-1)%10,(B-1)%10),min(min((C-1)%10,(D-1)%10)),(E-1)%10);
      |                                                                              ~~~^~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: C++

#include <iostream>
#include <algorithm>
#include <list>
#include <map>
#include <cmath>

using namespace std;
#define lf double
#define ll long long int
#define map unordered_map
#define f(i, n) for (ll i = 0; i < n; i++)

ll getLastDigit(ll x)
{
    ll r = 0;
    if (x / 10 == 0)
        r = x;
    else
        r = x % 10 ? x % 10 : INT_MAX;

    return r;
}

int main()
{
    ios::ios_base::sync_with_stdio(0);
    // ll tc;
    // cin >> tc;
    ll n = 5;
    // cin >> n;
    ll x = 0, m = 0, s = 0, max = 0, min = INT_MAX;
    f(i, n)
    {
        cin >> x;
        min = getLastDigit(x) <= getLastDigit(min) ? x : min;
        // cout << getLastDigit(x) << ' ' << min << '\n';
        m = x % 10 ? x + (10 - x % 10) : x; // tresholder 10
        s += m;
    }

    ll substract = min % 10 ? 10 - min % 10 : 0;
    s -= substract;
    cout << s;
    return 0;
}


Compiler output:
a.cc: In function 'long long int getLastDigit(long long int)':
a.cc:19:31: error: 'INT_MAX' was not declared in this scope
   19 |         r = x % 10 ? x % 10 : INT_MAX;
      |                               ^~~~~~~
a.cc:6:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    5 | #include <cmath>
  +++ |+#include <climits>
    6 | 
a.cc: In function 'int main()':
a.cc:31:44: error: 'INT_MAX' was not declared in this scope
   31 |     ll x = 0, m = 0, s = 0, max = 0, min = INT_MAX;
      |                                            ^~~~~~~
a.cc:31:44: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1000000007;
using ll = long long;
int main() {
ll a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
ll f, g, h, i,j;
f = (a + 9) / 10 * 10;
g = (b + 9) / 10 * 10;
h = (c + 9) / 10 * 10;
i = (d + 9) / 10 * 10;
j = (e + 9) / 10 * 10;
ll ans = f + g + h + i + j;
ans -= ({f - a, g - b, h - c, i - d, j - e});
cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:43: error: expected ';' before '}' token
   15 | ans -= ({f - a, g - b, h - c, i - d, j - e});
      |                                           ^
      |                                           ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  vector<int>A(5);
  for(int i=0;i<5;i++)
    cin>>A.at(i);
  vector<int> B(5);
  for(int i=0;i<5+i++)
    B.at(i)=A.at(i)%10-1;
  int min=10;
  for(int i=0;i<5;i++)
    if(B.at(i)<min)
      min=B.at(i);
  
  int ans=min-9;
  for(int i=0;i<5;i++)
    ans+=((A.at(i)-1)/10)*10+10;
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0;i<5+i++)
      |                      ^
      |                      ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  vector<int>A(5);
  for(int i=0;i<5;i++)
    cin>>A.at(i);
  vector<int> B(i);
  for(int i=0;i<5+i++)
    B.at(i)=A.at(i)%10-1;
  int min=10;
  for(int i=0;i<5;i++)
    if(B.at(i)<min)
      min=B.at(i);
  
  int ans=min-9;
  for(int i=0;i<5;i++)
    ans+=((A.at(i)-1)/10)*10+10;
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'i' was not declared in this scope
    7 |   vector<int> B(i);
      |                 ^
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0;i<5+i++)
      |                      ^
      |                      ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  cector<int>A(5);
  for(int i=0;i<5;i++)
    cin>>A.at(i);
  vector<int> B(i);
  for(int i=0;i<5+i++)
    B.at(i)=A.at(i)%10-1;
  int min=10;
  for(int i=0;i<5;i++)
    if(B.at(i)<min)
      min=B.at(i);
  
  int ans=min-10;
  for(int i=0;i<5;i++)
    ans+=((A.at(i)-1)/10)*10+10;
  cout<<ans<<endl;
   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cector' was not declared in this scope
    4 |   cector<int>A(5);
      |   ^~~~~~
a.cc:4:10: error: expected primary-expression before 'int'
    4 |   cector<int>A(5);
      |          ^~~
a.cc:6:10: error: 'A' was not declared in this scope
    6 |     cin>>A.at(i);
      |          ^
a.cc:7:17: error: 'i' was not declared in this scope
    7 |   vector<int> B(i);
      |                 ^
a.cc:8:22: error: expected ';' before ')' token
    8 |   for(int i=0;i<5+i++)
      |                      ^
      |                      ;
a.cc:9:13: error: 'A' was not declared in this scope
    9 |     B.at(i)=A.at(i)%10-1;
      |             ^
a.cc:17:12: error: 'A' was not declared in this scope
   17 |     ans+=((A.at(i)-1)/10)*10+10;
      |            ^
Language: C++

f=[]
t=[]
r=[0]
for i in range(5):
    f.append(int(input()))
for i in range(5):
    if f[i]%10!=0:
        r.append(10-f[i]%10)
        t.append((f[i]//10+1)*10)
    else:
        t.append(f[i])
print(sum(t)-max(r))


Compiler output:
a.cc:1:1: error: 'f' does not name a type
    1 | f=[]
      | ^
Language: C++

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

int main(){
    vector<int> menu(5);
    int mini = 9;
    for (int i = 0; i < 5; i++){
        cin >> menu[i];
        if (a != 0){
            mini = min(mini,menu[i]%10);
        }
    }

    int sum = 0;

    for (int i = 0; i < 5; i++){
        if (menu[i]%10 == 0){
            sum += menu[i] / 10;
        }else if (menu[i]%10 == mini){
            sum += menu[i];
        }else{
            sum += (menu[i]/10)*10 + 10;
        }
    }

    cout << sum << endl;
}

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

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

int main(){
    vector<int> menu(5);
    int mini = 9;
    for (int i = 0; i < 5; i++){
        int a;
        cin >> a;
        pair<int,int> p = make_pair(a%10,a);
        menu[i] = p;
        if (a != 0){
            mini = min(mini,a%10);
        }
    }

    int sum = 0;

    for (int i = 0; i < 5; i++){
        if (menu[i].first == 0){
            sum += menu[i].second / 10;
        }else if (menu[i].first == mini){
            sum += menu[i].second;
        }else{
            sum += (menu[i].second/10)*10 + 10;
        }
    }

    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: cannot convert 'std::pair<int, int>' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment
   11 |         menu[i] = p;
      |                   ^
      |                   |
      |                   std::pair<int, int>
a.cc:20:21: error: request for member 'first' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   20 |         if (menu[i].first == 0){
      |                     ^~~~~
a.cc:21:28: error: request for member 'second' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   21 |             sum += menu[i].second / 10;
      |                            ^~~~~~
a.cc:22:27: error: request for member 'first' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |         }else if (menu[i].first == mini){
      |                           ^~~~~
a.cc:23:28: error: request for member 'second' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   23 |             sum += menu[i].second;
      |                            ^~~~~~
a.cc:25:29: error: request for member 'second' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   25 |             sum += (menu[i].second/10)*10 + 10;
      |                             ^~~~~~
Language: C++

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

int main(){
    vector<int> menu(5);
    int mini = 9;
    for (int i = 0; i < 5; i++){
        int a;
        cin >> a;
        pair<int,int> p = make_pair(a%10,a);
        menu[i] = p;
        if (a != 0){
            mini = min(mini,a%10);
        }
    }

    int sum = 0;

    for (int i = 0; i < 5; i++){
        if (menu[i].first == 0){
            sum += menu[i] / 10;
        }else if (menu[i].first == mini){
            sum += menu[i];
        }else{
            sum += (menu[i]/10)*10 + 10;
        }
    }

    cout << sum << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: cannot convert 'std::pair<int, int>' to '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} in assignment
   11 |         menu[i] = p;
      |                   ^
      |                   |
      |                   std::pair<int, int>
a.cc:20:21: error: request for member 'first' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   20 |         if (menu[i].first == 0){
      |                     ^~~~~
a.cc:22:27: error: request for member 'first' in 'menu.std::vector<int>::operator[](((std::vector<int>::size_type)i))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   22 |         }else if (menu[i].first == mini){
      |                           ^~~~~
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> Time = { a, b, c, d, e };

  vector<int> NextTime(5);

  for(int i = 0; i < N; i++){
    if(Time[i] % 10 != 0){ NextTime[i] = Time[i] - Time[i] % 10 + 10; }
    else{ NextTime[i] = Time[i]; }
  }

  int BestTime = 99999999;
  int sum = 0;
  for(int i = 0; i < 5; i++){
    sum += NextTime[i];
  }

  for(int i = 0; i < 5; i++){
    sum -= NextTime[i];
    sum += Time[i];

    if(sum < BestTime) BestTime = sum;
    sum -= Time[i];
    sum += NextTime[i];
  }

  cout << BestTime << endl;

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: 'N' was not declared in this scope
   13 |   for(int i = 0; i < N; i++){
      |                      ^
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> 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] - Time[i] % 10 + 10; }
    else{ NextTime[i] = Time[i]; }
  }

  int BestTime = 99999999;
  int sum = 0;
  for(int i = 0; i < 5; i++){
    sum += NextTime[i];
  }

  for(int i = 0; i < 5; i++){
    sum -= NextTime[i];
    sum += Time[i];

    if(sum < BestTime) BestTime = sum;
    sum -= Time[i];
    sum += NextTime[i];
  }

  cout << BestTime << endl;

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'N' was not declared in this scope
   11 |   vector<int> NextTime(N);
      |                        ^
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> 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] - Time[i] % 10 + 10; }
    else{ NextTime[i] = Time[i]; }
  }

  int BestTime = 99999999;
  int sum = 0;
  for(int i = 0; i < 5; i++){
    sum += NextTime[i];
  }

  for(int i = 0; i < N; i++){
    sum -= NextTime[i];
    sum += Time[i];

    if(sum < BestTime) BestTime = sum;
    sum -= Time[i];
    sum += NextTime[i];
  }

  cout << BestTime << endl;

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: 'N' was not declared in this scope
   11 |   vector<int> NextTime(N);
      |                        ^
Language: C++

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


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

int main() {
  int a,b,c,d,e;
  cin >> a>>b>>c>>d>>e;
  int sum=0;
  rep(i,n){
    sum+= maxtime(a);
  }
  sum -= max(remtime(a),remtime(b),remtome(c),remtime(d),remtime(e));
  cout << sum<< endl;
}

Compiler output:
a.cc: In function 'int remtime(int)':
a.cc:10:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   10 |   return maxtime - x;
      |          ~~~~~~~~^~~
a.cc:10:18: error: invalid conversion from 'int (*)(int)' to 'int' [-fpermissive]
   10 |   return maxtime - x;
      |          ~~~~~~~~^~~
      |                  |
      |                  int (*)(int)
a.cc: In function 'int main()':
a.cc:17:9: error: 'n' was not declared in this scope
   17 |   rep(i,n){
      |         ^
a.cc:3:40: note: in definition of macro 'rep'
    3 | #define rep(i, n) for (int i = 0; i < (n); i++)
      |                                        ^
a.cc:20:36: error: 'remtome' was not declared in this scope; did you mean 'remtime'?
   20 |   sum -= max(remtime(a),remtime(b),remtome(c),remtime(d),remtime(e));
      |                                    ^~~~~~~
      |                                    remtime
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define F first
#define S second
//-std=c++11
#define print(x) printf("%.12f",x);
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define Red ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define rep(i, n) for(int i =0 ; i < n; ++i)
#define repr(i, n) for(int i=n-1;i>=0;i--)
#define Rep(i,a,b) for(int i=a;i<=b;i++)
#define Repr(i,a,b) for(int i=a;i>=b;i--)
#define pii pair < int, int >
#define iter ::iterator
#define forit(a) for(it=a.begin();it!=a.end();it++)
typedef vector<int> vi;
typedef  long long ll;
const int inf = int(1e9);
const int mod = inf + 7;
const int N = (int)2e5 + 5;

void solve(){
		int a[5];
		vector<pair<int,int> >v;
		rep(i,5){
			cin>>a[i]
			v.pb(mp(a[i]%10,a[i]));
		}
		sort(all(v));
		int ans=0;
		int x=-1;
		bool ok=0;
		rep(i,sz(v)){
			if(v[i].F==0)ans+=v[i].S;
			else if(!ok)x=v[i].S,ok=1;  
			else ans+=v[i].S/10+10;
		}
		cout<<ans+x;
 
}


int main(){
	Red;
	int t=1;
	//cin>>t;
	while(t--)
	solve();
	return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:29:34: error: expected ';' before 'v'
   29 |                         cin>>a[i]
      |                                  ^
      |                                  ;
   30 |                         v.pb(mp(a[i]%10,a[i]));
      |                         ~
Language: C++

//123 A
#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <math.h>
#include <vector>
using namespace std;

//B
int main(){
    int a[3];
    mina = a[0];
    maxa = a[0];
    for(int i=0;i<3;i++) cin>>a[i];
    for(int i=0;i<3;i++){
        if(a[i]>n) maxa=a[i];
        if(a[i]<n) mina=a[i];
    }
    int ans=max(maxa)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'mina' was not declared in this scope
   12 |     mina = a[0];
      |     ^~~~
a.cc:13:5: error: 'maxa' was not declared in this scope
   13 |     maxa = a[0];
      |     ^~~~
a.cc:16:17: error: 'n' was not declared in this scope
   16 |         if(a[i]>n) maxa=a[i];
      |                 ^
a.cc:17:17: error: 'n' was not declared in this scope
   17 |         if(a[i]<n) mina=a[i];
      |                 ^
Language: C++

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

int main() {
  vector<int>a(5);
  for(int i=0;i<5;i++) cin>>a[i];
  vector<int>b(5);
  for(int i=0;i<5;i++){
    if(a[i]%10===0) b[i]=a[i];
    else b[i]=a[i]+10-a[i]%10;
  }
  int ans=b[0]+b[1]+b[2]+b[3]+b[4];
  for(int i=0;i<5;i++){
    int x=ans-b[i]+a[i];
    ans=min(ans,x);
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '=' token
    9 |     if(a[i]%10===0) b[i]=a[i];
      |                 ^
Language: C++

#include<iostream>
using namespace std ;

int main(){
	int c,mx ;
	mx = 0 ;
	int ans = 0 ;
	for(int i=0;i<5;i++){
		cin >> c ;
		ans += (c+9)/10 ;
		if(mx<10-c%10&&c%10!=0) mn = 10-c%10 ;
	}
	cout << ans-mx << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:41: error: 'mn' was not declared in this scope; did you mean 'mx'?
   11 |                 if(mx<10-c%10&&c%10!=0) mn = 10-c%10 ;
      |                                         ^~
      |                                         mx
Language: C++

#include<iostream>
using namespace std ;

int main(){
	int c,mn ;
	mx = 0 ;
	int ans = 0 ;
	for(int i=0;i<5;i++){
		cin >> c ;
		ans += (c+9)/10 ;
		if(mx<10-c%10&&c%10!=0) mn = 10-c%10 ;
	}
	cout << ans-mx << endl ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'mx' was not declared in this scope; did you mean 'mn'?
    6 |         mx = 0 ;
      |         ^~
      |         mn
Language: C++

//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
using namespace std;
const int INF= 1e9+5;
typedef long long ll;

int main(){
  vector<int>vec(5);
  for(int i=0;i<5;i++)cin>>vec[i];
  sort(vec.begin(),vec.end());
  int MIN=INF;
  do{
    int sum=0;
    for(int x:v){
      sum+=x;
      sum=(sum+10-1)/10*10;
    }
    MIN=min(INF,sum);
  }while(next_permutation(vec.begin(),vec.end()));
  cout<<MIN<<endl;
}
    
   

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: 'v' was not declared in this scope
   15 |     for(int x:v){
      |               ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define PI 3.14159265358979

using namespace std;

ll gcd(ll a, ll b);
ll power(ll n, ll k);
ll inv(ll n);
ll genfact(ll n, ll k);
ll fact(ll n);
ll nck(ll n, ll k);

int main(void){
  vector<int> a(5);
  for (int i = 0; i < n; i++){
    cin >> a[i];
  }
  sort(a.begin(), a.end());


  int t = 0;
  for (int i = 0; i < 4; i++){
    t += a[i];
    if (t % 10 != 0){
      t = t + 10 - t % 10;
    }
  }

  cout << t + a[5] << endl;

  return 0;
}

ll gcd(ll a, ll b){
  if (a < b)
    return gcd(b, a);
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}

ll power(ll n, ll k){
  ll res = 1;
  while(k > 0){
    if (k & 1) 
      res = res * n % MOD;
    n = n * n % MOD;
    k >>= 1;
  }
  return res;
}

ll genfact(ll n, ll k){

  ll res = 1;
  while (k >= 0){
    res = (res * (n - k)) % MOD;
    k--;
  }

  return res;
}

ll inv(ll n){
  return power(n, MOD - 2);
}

ll fact(ll n){
  return genfact(n, n - 1);
}

ll nck(ll n, ll k){
  if (k == 0)
    return 1;
  if (n <= 0)
    return 0;

  return ((genfact(n, k) % MOD) * inv(fact(k))) % MOD;
}


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

#include<bits/stdc++.h>
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: In function 'int main()':
a.cc:18:45: error: expected ';' before '{' token
   18 |   while(next_permutation(P.begin(),P.end())){
      |                                             ^
      |                                             ;
a.cc:21:10: error: expected '}' at end of input
   21 |         }
      |          ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

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;

            // nextTime[i] = (Time [i] + 9) / 10 * 10

        }
        
    
    int BestTime = 99999999; // 大きい値を適当に入れる
    //最後に注文するものを全通り計算
    for (int j = 0; j < N; j++)
    {
        if (i == j) {
            // 最後の処理
            int SumTime = 0;
            SumTime += Time[j];
        }
        else {
            // 最後以外の処理
            SumTime += nextTime[j];
        }
        BestTime = min(BestTime, SumTime);
        // if (BestTime > SumTime) BestTime = SumTime;
    }
     cout << BestTime << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: conversion from 'int' to non-scalar type 'std::vector<int>' requested
   16 |         vector<int> nextTime = (N);
      |                                ~^~
a.cc:31:13: error: 'i' was not declared in this scope
   31 |         if (i == j) {
      |             ^
a.cc:38:13: error: 'SumTime' was not declared in this scope
   38 |             SumTime += nextTime[j];
      |             ^~~~~~~
a.cc:40:34: error: 'SumTime' was not declared in this scope
   40 |         BestTime = min(BestTime, SumTime);
      |                                  ^~~~~~~
Language: C++

int a,b,c,d,e,ans,x;
int main(){
    cin>>a>>b>>c>>d>>e;
    ans+=a+b+c+d+e;
    if(a%10!=0) ans+=10-a%10,x=max(10-a%10,x);
    if(b%10!=0) ans+=10-b%10,x=max(10-b%10,x);
    if(c%10!=0) ans+=10-c%10,x=max(10-c%10,x);
    if(d%10!=0) ans+=10-d%10,x=max(10-d%10,x);
    if(e%10!=0) ans+=10-e%10,x=max(10-e%10,x);
    cout<<ans-x;
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin>>a>>b>>c>>d>>e;
      |     ^~~
a.cc:5:32: error: 'max' was not declared in this scope
    5 |     if(a%10!=0) ans+=10-a%10,x=max(10-a%10,x);
      |                                ^~~
a.cc:6:32: error: 'max' was not declared in this scope
    6 |     if(b%10!=0) ans+=10-b%10,x=max(10-b%10,x);
      |                                ^~~
a.cc:7:32: error: 'max' was not declared in this scope
    7 |     if(c%10!=0) ans+=10-c%10,x=max(10-c%10,x);
      |                                ^~~
a.cc:8:32: error: 'max' was not declared in this scope
    8 |     if(d%10!=0) ans+=10-d%10,x=max(10-d%10,x);
      |                                ^~~
a.cc:9:32: error: 'max' was not declared in this scope
    9 |     if(e%10!=0) ans+=10-e%10,x=max(10-e%10,x);
      |                                ^~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<ans-x;
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
   int a,b,c,d,e,ans;
   cin >> a >> b >> c >> d >> e;
   if(a%10 !=0){
    for(int i = 0;1;i++){
        if(a/10 < i){
            at = i*10;
            break;
        }
    }
   }
    else{
        at = a;
    }
    ans += at+b;
    if(ans%10 !=0){
    for(int i = 0;1;i++){
        if(ans/10 < i){
            ans = i*10;
            break;
        }
    }
    }
    ans += c;
    if(ans%10 !=0){
    for(int i = 0;1;i++){
        if(ans/10 < i){
            ans = i*10;
            break;
        }
    }
    }
    ans += d;
    if(ans%10 !=0){
    for(int i = 0;1;i++){
        if(ans/10 < i){
            ans = i*10;
            break;
        }
    }
    }
    ans += c;
    cout << ans << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'at' was not declared in this scope; did you mean 'a'?
    9 |             at = i*10;
      |             ^~
      |             a
a.cc:15:9: error: 'at' was not declared in this scope; did you mean 'a'?
   15 |         at = a;
      |         ^~
      |         a
a.cc:17:12: error: 'at' was not declared in this scope; did you mean 'a'?
   17 |     ans += at+b;
      |            ^~
      |            a
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
int main(){
  vll a(5);
  vll b(5);
  ll ans=0;
  rep(i,5){
    cin>>a[i];
    ans+=a[i];
    b[i]=10-a[i]%10;
    if(b[i]==10) b[i]=0;
  }
  sort(all(b));
  rep(i,4) {

   ans+=b[i];
  }
  COUT

Compiler output:
a.cc: In function 'int main()':
a.cc:53:3: error: 'COUT' was not declared in this scope
   53 |   COUT
      |   ^~~~
a.cc:53:7: error: expected '}' at end of input
   53 |   COUT
      |       ^
a.cc:38:11: note: to match this '{'
   38 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
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 };

  int best_time = 1e9;

  do {
    int now_time = 0;
    for (int i = 0; i < n; i++) {
      while(now_time % 10 != 0) {
        now_time++;
      }
      now_time += time[i];
    }
    best_time = min(now_time, best_time);
  } while(next_permutation(time.begin(), time.end()));

  cout << best_time << endl;
  return 0;
}

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

#include<bits/stdc++.h>
using namespace std;
bool cmp(int a,int b)
{
  return (a%10)>(b%10);
}
int main()
{
  vector<int> v;
  int ans=0;
  for(int i=0;i<5;i++)
  {
    int h;
    cin>>h;
    if(h%10==0)
      ans+=h;
    else
      v.push_back(h);
  }
  sort(v.begin(),v.end(),cmp);
  for(auto i:v)
    ans += (i+10) - (i%10);
  if(v.size()>0)
  {ans-=(v.back()+10)-(v.back()%10); ans+=v.back());}
  cout<<ans<<"\n";
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:51: error: expected ';' before ')' token
   24 |   {ans-=(v.back()+10)-(v.back()%10); ans+=v.back());}
      |                                                   ^
      |                                                   ;
Language: C++

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

using namespace std;

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

    vector<int> b(5);
    for (int i=0; i<5; i++){
        if(a[i] % 10 == 0){
            b[i] = 10;
        }else{
            b[i] = a[i]%10;
        }
    }

    vector<int>::iterator iter = min_element(b.begin(), b.end());
    size_t index = distance(b.begin(), iter);

    int ans = 0;

    for(int i=0; i<5; i++){
        if (i==index || a[i]%10==0){
            ans += a[i];
        }else{
            ans += (a[i]/10) * 10 + 10;
        }
    }
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:34: error: 'min_element' was not declared in this scope
   22 |     vector<int>::iterator iter = min_element(b.begin(), b.end());
      |                                  ^~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int arr[5];
  // taking input
  for (int i = 0; i < 5; i++)
    cin >> arr[i];
// defining a vector
  vector<int> res;
  int summ = 0;
  for (int i = 0; i < 5; i++){
  	int temp = arr[i]%10;
    (temp != 0)? res.push_back(temp) : temp += 0;
    summ += arr[i]/10;
  }
  (res.size()!=0)? cout << summ*10 + *min_element(res.begin(), res.end()) << '\n' : cout << summ*10 <<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:45: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'
   15 |     (temp != 0)? res.push_back(temp) : temp += 0;
      |                                        ~~~~~^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int arr[5];
  // taking input
  for (int i = 0; i < 5; i++)
    cin >> arr[i];
// defining a vector
  vector<int> res;
  int summ = 0;
  for (int i = 0; i < 5; i++){
  	temp = arr[i]%10;
    (temp != 0)? res.push_back(temp) : temp += 0;
    summ += arr[i]/10;
  }
  (res.size()!=0)? cout << summ*10 + *min_element(res.begin(), res.end()) << '\n' : cout << summ*10 <<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'temp' was not declared in this scope; did you mean 'tm'?
   14 |         temp = arr[i]%10;
      |         ^~~~
      |         tm
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int arr[5];
  // taking input
  for (int i = 0; i < 5; i++)
    cin >> arr[i];
// defining a vector
  vector<int> res;
  int summ = 0;
  for (int i = 0; i < n; i++){
  	int temp = arr[i]%10;
    (temp != 0)? res.push_back(temp) : temp += 0;
    summ += arr[i]/10;
  }
  (res.size()!=0)? cout << summ*10 + *min_element(res.begin(), res.end()) << '\n' : cout << summ*10 <<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'n' was not declared in this scope
   13 |   for (int i = 0; i < n; i++){
      |                       ^
a.cc:15:45: error: second operand to the conditional operator is of type 'void', but the third operand is neither a throw-expression nor of type 'void'
   15 |     (temp != 0)? res.push_back(temp) : temp += 0;
      |                                        ~~~~~^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
int arr[5];
  // taking input
  for (int i = 0; i < 5; i++)
    cin >> arr[i];
// defining a vector
  vector<int> res;
  int summ = 0;
  for (int i = 0; i < n; i++){
  	temp = arr[i]%10;
    (temp != 0)? res.push_back(temp) : temp += 0;
    summ += arr[i]/10;
  }
  (res.size()!=0)? cout << summ*10 + *min_element(res.begin(), res.end()) << '\n' : cout << summ*10 <<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: 'n' was not declared in this scope
   13 |   for (int i = 0; i < n; i++){
      |                       ^
a.cc:14:9: error: 'temp' was not declared in this scope; did you mean 'tm'?
   14 |         temp = arr[i]%10;
      |         ^~~~
      |         tm
Language: C++

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

int main() {
  int A,B,C,D,E;
  cin >> A>>B>>C>>D>>E;
  int a,b,c,d,e;
  a = A -1;
  b = B -1;
  c = C -1;
  d = D -1;
  e = E - 1;
  a = A % 10;
  b = B % 10;
  c = C % 10;
  d = D % 10;
  e = E % 10;
  cout<< ((A + 9) / 10 + (B + 9)/10 + (C + 9) / 10 + (D + 9) / 10 + (E + 9) / 10)-10+min(a,b,c,d,e);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:89: error: no matching function for call to 'min(int&, int&, int&, int&, int&)'
   18 |   cout<< ((A + 9) / 10 + (B + 9)/10 + (C + 9) / 10 + (D + 9) / 10 + (E + 9) / 10)-10+min(a,b,c,d,e);
      |                                                                                      ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   candidate expects 2 arguments, 5 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, 5 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, 5 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:   candidate expects 2 arguments, 5 provided
Language: C++

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

int main() {
  int A,B,C,D,E;
  cin >> A>>B>>C>>D>>E;
  int a,b,c,d,e;
  a = A -1;
  b = B -1;
  c = C -1;
  d = D -1;
  e = E - 1;
  a = A % 10;
  b = B % 10;
  c = C % 10;
  d = D % 10;
  e = E % 10;
  cout<< ((A + 9) / 10 + (B + 9)/10 + (C + 9) / 10 + (D + 9) / 10 + (E + 9) / 10))-10+min(a,b,c,d,e);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:82: error: expected ';' before ')' token
   18 |   cout<< ((A + 9) / 10 + (B + 9)/10 + (C + 9) / 10 + (D + 9) / 10 + (E + 9) / 10))-10+min(a,b,c,d,e);
      |                                                                                  ^
      |                                                                                  ;
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
   	Scanner sc = new Scanner(System.in);
 
    int Na = sc.nextInt();
    int Nb = sc.nextInt();
    int Nc = sc.nextInt();
    int Nd = sc.nextInt();
    int Ne = sc.nextInt();
    
    int count = 0;
    int[] N1 = new int[5];
    N1[0] = Na%10;
    N1[1] = Nb%10;
    N1[2] = Nc%10;
    N1[3] = Nd%10;
    N1[4] = Ne%10;
    
    int sum = Na-N1[0]+Nb-N1[1]+Nc-N1[2]+Nd-N1[3]+Ne-N1[4]+40;
    
    Arrays.sort(N1);
    int min = 0;
    for(int i = 0; i<5;i++)
    {
    	if(N1[i] == 0) count++;
      	else 
        {
          min = N1[i];
          break;
        }
    }
    if(count == 5) count = 4;
   	System.out.println(sum - 10 * count +min);
 }

Compiler output:
Main.java:35: error: reached end of file while parsing
 }
  ^
1 error
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
   	Scanner sc = new Scanner(System.in);
 
    int Na = sc.nextInt();
    int Nb = sc.nextInt();
    int Nc = sc.nextInt();
    int Nd = sc.nextInt();
    int Ne = sc.nextInt();
    
    int count = 0;
    int[] N1 = new int[5];
    N1[0] = Na%10;
    N1[1] = Nb%10;
    N1[2] = Nc%10;
    N1[3] = Nd%10;
    N1[4] = Ne%10;
    
    int sum = Na-N1[0]+Nb-N1[1]+Nc-N1[2]+Nd-N1[3]+Ne-N1[4]+40;
    
    Arrays.sort(N1);
    int min = 0;
    for(int i = 0; i<5;i++)
    {
    	if(N1[i] == 0) count++;
      	else 
        {
          min = N1[i];
          break;
        }
    }
    if(count == 5) count ==4;
   	System.out.println(sum - 10 * count +min);
 }

Compiler output:
Main.java:33: error: not a statement
    if(count == 5) count ==4;
                         ^
Main.java:35: error: reached end of file while parsing
 }
  ^
2 errors