6792 | 2023-12-19 10:06:06 | AMDFanboy | Bevásárlás | cpp17 | Accepted 100/100 | 3ms | 3456 KiB |
#include <iostream>
using namespace std;
int main()
{
int A, B, C, abc, ossz=0, doboz=10;
cin>>A>>B>>C;
abc=A+B+C;
if(abc<10)
cout<<"-1";
else
{
while(doboz>0)
{
if(A>0)
{
ossz+=300;
A--;
doboz--;
}
else if(B>0)
{
ossz+=350;
B--;
doboz--;
}
else if(C>0)
{
ossz+=400;
C--;
doboz--;
}
}
cout<<ossz;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2072 KiB | ||||
3 | Accepted | 3ms | 2280 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 3ms | 2492 KiB | ||||
5 | Accepted | 3ms | 2704 KiB | ||||
6 | Accepted | 3ms | 2948 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 3024 KiB | ||||
8 | Accepted | 3ms | 3100 KiB | ||||
9 | Accepted | 3ms | 3228 KiB | ||||
10 | Accepted | 3ms | 3308 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 3ms | 3308 KiB | ||||
12 | Accepted | 3ms | 3456 KiB | ||||
13 | Accepted | 3ms | 3432 KiB | ||||
14 | Accepted | 3ms | 3452 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 3ms | 3316 KiB | ||||
16 | Accepted | 3ms | 3356 KiB | ||||
17 | Accepted | 3ms | 3452 KiB | ||||
18 | Accepted | 3ms | 3328 KiB | ||||
19 | Accepted | 2ms | 3320 KiB | ||||
20 | Accepted | 3ms | 3324 KiB |