1674 | 2022-12-01 15:32:39 | Jano321 | Bevásárlás | cpp11 | Wrong answer 10/100 | 3ms | 4072 KiB |
#include <iostream>
using namespace std;
int main()
{
int a,b,c,osszeg=0;
cin>>a>>b>>c;
if(a+b+c>10)
{
if(a>=10)
{
osszeg+=10*300;
}
else
if(a+b>=10)
{
osszeg+=a*300;
osszeg+=(10-a)*350;
}
else
{
osszeg+=a*300;
osszeg+=b*350;
osszeg+=(10-a-b)*400;
}
cout<<osszeg;
}
else
{
cout<<"-1";
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1748 KiB | ||||
2 | Accepted | 2ms | 2136 KiB | ||||
3 | Accepted | 2ms | 2144 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2276 KiB | ||||
5 | Accepted | 2ms | 2356 KiB | ||||
6 | Accepted | 2ms | 2488 KiB | ||||
subtask3 | 0/20 | ||||||
7 | Accepted | 2ms | 2712 KiB | ||||
8 | Accepted | 2ms | 2616 KiB | ||||
9 | Wrong answer | 2ms | 2744 KiB | ||||
10 | Accepted | 2ms | 2824 KiB | ||||
subtask4 | 0/30 | ||||||
11 | Wrong answer | 2ms | 3068 KiB | ||||
12 | Accepted | 2ms | 3072 KiB | ||||
13 | Accepted | 2ms | 3308 KiB | ||||
14 | Accepted | 2ms | 3396 KiB | ||||
subtask5 | 0/40 | ||||||
15 | Wrong answer | 2ms | 3604 KiB | ||||
16 | Accepted | 2ms | 3784 KiB | ||||
17 | Accepted | 2ms | 3748 KiB | ||||
18 | Wrong answer | 2ms | 3996 KiB | ||||
19 | Accepted | 2ms | 4068 KiB | ||||
20 | Accepted | 2ms | 4072 KiB |