1696 | 2022-12-01 15:58:36 | Tina0731 | Bevásárlás | cpp11 | Accepted 100/100 | 3ms | 4728 KiB |
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin>>a>>b>>c;
int osszeg=0, kell=10;
if(a+b+c<10)
cout<<-1;
else
{
if(a>=10)
osszeg=3000;
else
{
osszeg+=a*300;
kell-=a;
if(b>=kell)
osszeg+=kell*350;
else
{
osszeg+=b*350;
kell-=b;
osszeg+=kell*400;
}
}
cout<<osszeg;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1872 KiB | ||||
2 | Accepted | 2ms | 2232 KiB | ||||
3 | Accepted | 2ms | 2384 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2464 KiB | ||||
5 | Accepted | 2ms | 2676 KiB | ||||
6 | Accepted | 2ms | 2784 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 2ms | 2936 KiB | ||||
8 | Accepted | 2ms | 3012 KiB | ||||
9 | Accepted | 2ms | 3256 KiB | ||||
10 | Accepted | 2ms | 3460 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3580 KiB | ||||
12 | Accepted | 2ms | 3704 KiB | ||||
13 | Accepted | 2ms | 3892 KiB | ||||
14 | Accepted | 2ms | 4076 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 2ms | 4104 KiB | ||||
16 | Accepted | 2ms | 4220 KiB | ||||
17 | Accepted | 2ms | 4292 KiB | ||||
18 | Accepted | 2ms | 4364 KiB | ||||
19 | Accepted | 2ms | 4488 KiB | ||||
20 | Accepted | 2ms | 4728 KiB |