1677 | 2022-12-01 15:34:07 | Jano321 | Bevásárlás | cpp11 | Accepted 100/100 | 3ms | 3536 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 | 1880 KiB | ||||
2 | Accepted | 2ms | 2124 KiB | ||||
3 | Accepted | 2ms | 2368 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2516 KiB | ||||
5 | Accepted | 2ms | 2716 KiB | ||||
6 | Accepted | 2ms | 2968 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 2ms | 2960 KiB | ||||
8 | Accepted | 2ms | 3076 KiB | ||||
9 | Accepted | 2ms | 3324 KiB | ||||
10 | Accepted | 2ms | 3348 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3376 KiB | ||||
12 | Accepted | 2ms | 3368 KiB | ||||
13 | Accepted | 2ms | 3536 KiB | ||||
14 | Accepted | 2ms | 3512 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 2ms | 3516 KiB | ||||
16 | Accepted | 2ms | 3400 KiB | ||||
17 | Accepted | 2ms | 3524 KiB | ||||
18 | Accepted | 2ms | 3524 KiB | ||||
19 | Accepted | 2ms | 3404 KiB | ||||
20 | Accepted | 2ms | 3404 KiB |