6790 | 2023-12-19 10:02:23 | AMDFanboy | Bevásárlás | cpp17 | Wrong answer 20/100 | 3ms | 3728 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--;
}
if(C>0)
{
ossz+=400;
C--;
doboz--;
}
}
cout<<ossz;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1748 KiB | ||||
2 | Accepted | 3ms | 1908 KiB | ||||
3 | Accepted | 3ms | 2120 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 3ms | 2480 KiB | ||||
5 | Wrong answer | 3ms | 2556 KiB | ||||
6 | Wrong answer | 3ms | 2696 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 3040 KiB | ||||
8 | Accepted | 3ms | 2972 KiB | ||||
9 | Accepted | 3ms | 2864 KiB | ||||
10 | Accepted | 3ms | 2880 KiB | ||||
subtask4 | 0/30 | ||||||
11 | Accepted | 3ms | 3000 KiB | ||||
12 | Wrong answer | 3ms | 3248 KiB | ||||
13 | Wrong answer | 3ms | 3204 KiB | ||||
14 | Wrong answer | 3ms | 3460 KiB | ||||
subtask5 | 0/40 | ||||||
15 | Accepted | 3ms | 3488 KiB | ||||
16 | Accepted | 3ms | 3612 KiB | ||||
17 | Accepted | 3ms | 3728 KiB | ||||
18 | Accepted | 3ms | 3680 KiB | ||||
19 | Wrong answer | 3ms | 3688 KiB | ||||
20 | Accepted | 3ms | 3684 KiB |