Language: C++

int main(void)
{
    vector<int> dishes(5, 0);
    for (int i = 0; i < 5; i++)
    {
        cin >> dishes.at(i);
    }

    vector<int> time(5, 0);
    for (int i = 0; i < 5; i++)
    {
        if (dishes.at(i) >= 10 && dishes.at(i) < 100)
        {
            time.at(i) = dishes.at(i) % 10;
        }
        else if (dishes.at(i) >= 100)
        {
            time.at(i) = dishes.at(i) % 10;
        }
        else
        {
            time.at(i) = dishes.at(i);
        }
    }

    // for (int i = 0; i < 5; i++)
    // {
    //     cout << time.at(i) << endl;
    // }

    int min = time.at(0) != 0 ? time.at(0) : 1;
    int location = 0;
    for (int i = 0; i < 5; i++)
    {
        if (min >= time.at(i) && time.at(i) != 0)
        {
            min = time.at(i);
            location = i;
        }
    }

    int sum = 0;
    int temp;
    for (int i = 0; i < 5; i++)
    {
        if (i != location)
        {
            sum += dishes.at(i);
        }
        if (sum % 10 != 0)
        {
            temp = sum % 10;
            sum += (10 - temp);
        }
    }
    sum += dishes.at(location);
    cout << sum << endl;
    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'vector' was not declared in this scope
    3 |     vector<int> dishes(5, 0);
      |     ^~~~~~
a.cc:3:12: error: expected primary-expression before 'int'
    3 |     vector<int> dishes(5, 0);
      |            ^~~
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> dishes.at(i);
      |         ^~~
a.cc:6:16: error: 'dishes' was not declared in this scope
    6 |         cin >> dishes.at(i);
      |                ^~~~~~
a.cc:9:12: error: expected primary-expression before 'int'
    9 |     vector<int> time(5, 0);
      |            ^~~
a.cc:12:13: error: 'dishes' was not declared in this scope
   12 |         if (dishes.at(i) >= 10 && dishes.at(i) < 100)
      |             ^~~~~~
a.cc:14:13: error: 'time' was not declared in this scope
   14 |             time.at(i) = dishes.at(i) % 10;
      |             ^~~~
a.cc:1:1: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
  +++ |+#include <ctime>
    1 | int main(void)
a.cc:18:13: error: 'time' was not declared in this scope
   18 |             time.at(i) = dishes.at(i) % 10;
      |             ^~~~
a.cc:18:13: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
a.cc:22:13: error: 'time' was not declared in this scope
   22 |             time.at(i) = dishes.at(i);
      |             ^~~~
a.cc:22:13: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
a.cc:31:15: error: 'time' was not declared in this scope
   31 |     int min = time.at(0) != 0 ? time.at(0) : 1;
      |               ^~~~
a.cc:31:15: note: 'time' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
a.cc:48:20: error: 'dishes' was not declared in this scope
   48 |             sum += dishes.at(i);
      |                    ^~~~~~
a.cc:56:12: error: 'dishes' was not declared in this scope
   56 |     sum += dishes.at(location);
      |            ^~~~~~
a.cc:57:5: error: 'cout' was not declared in this scope
   57 |     cout << sum << endl;
      |     ^~~~
a.cc:57:20: error: 'endl' was not declared in this scope
   57 |     cout << sum << endl;
      |                    ^~~~