1637 | 2022-11-30 21:06:11 | Timi | Bevásárlás | cpp11 | Accepted 100/100 | 3ms | 4180 KiB |
#include <iostream>
using namespace std;
int main()
{
int A, B, C, osszeg=0, N=10;
cin>>A>>B>>C;
if (A+B+C<10)
cout<<-1;
else
{
if (A>=10)
osszeg=300*10;
else
{
osszeg=A*300;
N=N-A;
if (B>=N)
osszeg=osszeg+N*350;
else
{
osszeg=osszeg+B*350;
N=N-B;
osszeg=osszeg+N*400;
}
}
cout<<osszeg;
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1876 KiB | ||||
2 | Accepted | 2ms | 2064 KiB | ||||
3 | Accepted | 2ms | 2316 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2472 KiB | ||||
5 | Accepted | 2ms | 2680 KiB | ||||
6 | Accepted | 2ms | 2752 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 2ms | 3004 KiB | ||||
8 | Accepted | 2ms | 3108 KiB | ||||
9 | Accepted | 2ms | 3320 KiB | ||||
10 | Accepted | 2ms | 3408 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3480 KiB | ||||
12 | Accepted | 2ms | 3492 KiB | ||||
13 | Accepted | 2ms | 3600 KiB | ||||
14 | Accepted | 2ms | 3600 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 2ms | 3844 KiB | ||||
16 | Accepted | 2ms | 3800 KiB | ||||
17 | Accepted | 2ms | 3804 KiB | ||||
18 | Accepted | 2ms | 3804 KiB | ||||
19 | Accepted | 2ms | 3932 KiB | ||||
20 | Accepted | 2ms | 4180 KiB |