62672023-11-10 20:17:53horkaBevásárláscpp17Accepted 100/1003ms4052 KiB
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int a,b,c; cin>>a>>b>>c;
    int sum=0,vett=0;
    sum+=min(300*10,300*a);
    vett+=min(10,a);
    if(vett<10) {sum+=min((10-vett)*350,b*350); vett+=min(10-vett,b);}
    if(vett<10) sum+=min((10-vett)*400,c*400);
    cout<<(a+b+c>=10?sum:-1)<<endl;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1876 KiB
2Accepted3ms2120 KiB
3Accepted3ms2332 KiB
subtask210/10
4Accepted3ms2540 KiB
5Accepted2ms2600 KiB
6Accepted3ms2800 KiB
subtask320/20
7Accepted3ms2888 KiB
8Accepted3ms3136 KiB
9Accepted3ms3224 KiB
10Accepted3ms3440 KiB
subtask430/30
11Accepted2ms3564 KiB
12Accepted3ms3644 KiB
13Accepted3ms3528 KiB
14Accepted3ms3520 KiB
subtask540/40
15Accepted3ms3920 KiB
16Accepted3ms3932 KiB
17Accepted3ms3872 KiB
18Accepted2ms3984 KiB
19Accepted2ms3924 KiB
20Accepted3ms4052 KiB