6793 | 2023-12-19 10:07:00 | KovacsBalint | Bevásárlás | cpp17 | Accepted 100/100 | 3ms | 4204 KiB |
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
int ossz=0,i=0;
if((a+b+c)<10)
{
cout<<"-1";
}
else
{
while(i!=10)
{
if(a>0)
{
ossz+=300;
a--;
}
else if(b>0)
{
ossz+=350;
b--;
}
else
{
ossz+=400;
c--;
}
i++;
}
cout<<ossz;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2120 KiB | ||||
3 | Accepted | 3ms | 2360 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 3ms | 2544 KiB | ||||
5 | Accepted | 3ms | 2628 KiB | ||||
6 | Accepted | 3ms | 2840 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 2928 KiB | ||||
8 | Accepted | 3ms | 3168 KiB | ||||
9 | Accepted | 3ms | 3388 KiB | ||||
10 | Accepted | 3ms | 3504 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 3ms | 3720 KiB | ||||
12 | Accepted | 3ms | 3816 KiB | ||||
13 | Accepted | 3ms | 4068 KiB | ||||
14 | Accepted | 3ms | 4180 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 3ms | 4044 KiB | ||||
16 | Accepted | 3ms | 4116 KiB | ||||
17 | Accepted | 3ms | 4200 KiB | ||||
18 | Accepted | 3ms | 4204 KiB | ||||
19 | Accepted | 3ms | 4196 KiB | ||||
20 | Accepted | 3ms | 4196 KiB |