58452023-10-03 21:58:31mmatedBevásárláscpp11Accepted 100/1003ms4472 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    const int a=300, b=350, c=400;
    int x,y,z;
    cin>>x>>y>>z;
    if(x+y+z <10)
    {
        cout<<-1;
        return;
    }
    int q=min(10,x);
    int s=q*a+min((10-q),y)*b +(10- q- min(10-q,y))*c;  
    cout<<s;
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1892 KiB
2Accepted3ms2084 KiB
3Accepted3ms2324 KiB
subtask210/10
4Accepted3ms2508 KiB
5Accepted2ms2736 KiB
6Accepted3ms2944 KiB
subtask320/20
7Accepted3ms3148 KiB
8Accepted2ms3236 KiB
9Accepted3ms3368 KiB
10Accepted3ms3600 KiB
subtask430/30
11Accepted2ms3684 KiB
12Accepted2ms3672 KiB
13Accepted3ms3800 KiB
14Accepted3ms3888 KiB
subtask540/40
15Accepted2ms3972 KiB
16Accepted2ms3968 KiB
17Accepted3ms4224 KiB
18Accepted3ms4332 KiB
19Accepted2ms4376 KiB
20Accepted2ms4472 KiB