6855 | 2023-12-19 12:23:55 | Bea124 | Bevásárlás | cpp17 | Accepted 100/100 | 3ms | 3160 KiB |
#include <iostream>
using namespace std;
int main()
{
int a,b,c,f=0;
cin>>a;
cin>>b;
cin>>c;
if(a>=10)
f=3000;
if(a<10)
{
if(a+b>=10)
f=a*300+((10-a)*350);
if(a+b<10)
f=(a*300)+(b*350)+(10-(a+b))*400;
if((a+b+c)<10)
f=-1;
}
cout<<f;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 3ms | 2124 KiB | ||||
3 | Accepted | 2ms | 2204 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2216 KiB | ||||
5 | Accepted | 3ms | 2404 KiB | ||||
6 | Accepted | 3ms | 2500 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 2708 KiB | ||||
8 | Accepted | 3ms | 2788 KiB | ||||
9 | Accepted | 3ms | 2916 KiB | ||||
10 | Accepted | 3ms | 3004 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 3ms | 3004 KiB | ||||
12 | Accepted | 3ms | 3004 KiB | ||||
13 | Accepted | 2ms | 3004 KiB | ||||
14 | Accepted | 3ms | 3028 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 3ms | 3020 KiB | ||||
16 | Accepted | 3ms | 3012 KiB | ||||
17 | Accepted | 3ms | 3008 KiB | ||||
18 | Accepted | 3ms | 3132 KiB | ||||
19 | Accepted | 3ms | 3160 KiB | ||||
20 | Accepted | 3ms | 3112 KiB |