11255 | 2024-08-01 12:20:57 | matekimado11 | Bevásárlás | cpp17 | Accepted 100/100 | 4ms | 760 KiB |
#include<iostream>
using namespace std;
int main()
{
int a,b,c,s=10,f=0;
cin>>a>>b>>c;
if(a>9){cout<<3000;}
else{s-=a;f+=a*300;
if(b>=s){cout<<f+s*350;}
else{s-=b;f+=b*350;
if(c>=s){cout<<f+s*400;}
else{cout<<"-1";}}}
cout<<endl;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 356 KiB | ||||
2 | Accepted | 3ms | 516 KiB | ||||
3 | Accepted | 3ms | 356 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 3ms | 472 KiB | ||||
5 | Accepted | 3ms | 500 KiB | ||||
6 | Accepted | 3ms | 256 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 3ms | 416 KiB | ||||
8 | Accepted | 3ms | 744 KiB | ||||
9 | Accepted | 3ms | 384 KiB | ||||
10 | Accepted | 3ms | 504 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 3ms | 256 KiB | ||||
12 | Accepted | 2ms | 256 KiB | ||||
13 | Accepted | 3ms | 384 KiB | ||||
14 | Accepted | 3ms | 528 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 3ms | 416 KiB | ||||
16 | Accepted | 3ms | 760 KiB | ||||
17 | Accepted | 3ms | 484 KiB | ||||
18 | Accepted | 3ms | 356 KiB | ||||
19 | Accepted | 2ms | 488 KiB | ||||
20 | Accepted | 4ms | 360 KiB |