68602023-12-19 12:36:16kbotiBevásárláscpp17Accepted 100/1003ms4484 KiB
#include <iostream>
using namespace std;

int main() {
    int a,b,c,n=10,k=0;
    cin>>a>>b>>c;
    if (a<n)
    {
        n=n-a;
        k=k+a*300;
    }
    else
    {
        k=k+n*300;
        n=0;
    }
    if (b<n)
    {
        n=n-b;
        k=k+b*350;
    }
    else
    {
        k=k+n*350;
        n=0;
    }
    if (c<n)
    {
        n=n-c;
        k=k+c*400;
    }
    else
    {
        k=k+n*400;
        n=0;
    }
    if (n>0)
        k=-1;
    cout<<k<<endl;
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms2024 KiB
2Accepted3ms2264 KiB
3Accepted3ms2404 KiB
subtask210/10
4Accepted3ms2660 KiB
5Accepted3ms2900 KiB
6Accepted3ms3020 KiB
subtask320/20
7Accepted3ms3104 KiB
8Accepted3ms3340 KiB
9Accepted3ms3340 KiB
10Accepted3ms3476 KiB
subtask430/30
11Accepted3ms3552 KiB
12Accepted3ms3640 KiB
13Accepted3ms3548 KiB
14Accepted3ms3792 KiB
subtask540/40
15Accepted3ms4012 KiB
16Accepted3ms4016 KiB
17Accepted3ms4028 KiB
18Accepted3ms4296 KiB
19Accepted3ms4404 KiB
20Accepted3ms4484 KiB