68542023-12-19 12:22:48Spurr007Bevásárláscpp17Accepted 100/1003ms3996 KiB
#include <iostream>

using namespace std;

int main()
{
    int a, b, c, sum=0, db=0;
    cin>>a>>b>>c;
    if((a+b+c)<10)
        cout<<"-1";
    else
    {
     while(db!=10)
    {
        if(a!=0)
        {
            a--;
            sum=sum+300;
            db++;
        }
        else if(b!=0)
        {
            b--;
            sum=sum+350;
            db++;
        }
        else if(c!=0)
        {
            c--;
            sum=sum+400;
            db++;
        }
    }
    cout<<sum;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1748 KiB
2Accepted3ms1908 KiB
3Accepted3ms2436 KiB
subtask210/10
4Accepted3ms2660 KiB
5Accepted3ms2720 KiB
6Accepted3ms2800 KiB
subtask320/20
7Accepted3ms2936 KiB
8Accepted3ms3076 KiB
9Accepted3ms3008 KiB
10Accepted3ms3220 KiB
subtask430/30
11Accepted3ms3208 KiB
12Accepted2ms3256 KiB
13Accepted3ms3136 KiB
14Accepted3ms3388 KiB
subtask540/40
15Accepted3ms3632 KiB
16Accepted3ms3528 KiB
17Accepted3ms3520 KiB
18Accepted3ms3764 KiB
19Accepted3ms3864 KiB
20Accepted3ms3996 KiB