1885 | 2022-12-07 09:04:19 | Anna | Bevásárlás | cpp17 | Accepted 100/100 | 3ms | 3988 KiB |
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
int main()
{
int A, B, C;
scanf("%d %d %d\n", &A, &B, &C);
if (A + B + C < 10)
{
printf("-1");
return 0;
}
else if (A + B < 10)
{
printf("%d", A * 300 + B * 350 + (10 - (A + B)) * 400);
return 0;
}
else if (A < 10)
{
printf("%d", A * 300 + (10 - A) * 350);
return 0;
}
else
{
printf("3000");
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1940 KiB | ||||
2 | Accepted | 2ms | 2180 KiB | ||||
3 | Accepted | 2ms | 2332 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 2ms | 2540 KiB | ||||
5 | Accepted | 2ms | 2780 KiB | ||||
6 | Accepted | 2ms | 2860 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 2ms | 2988 KiB | ||||
8 | Accepted | 2ms | 3236 KiB | ||||
9 | Accepted | 2ms | 3560 KiB | ||||
10 | Accepted | 2ms | 3608 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 2ms | 3680 KiB | ||||
12 | Accepted | 2ms | 3792 KiB | ||||
13 | Accepted | 2ms | 3676 KiB | ||||
14 | Accepted | 2ms | 3676 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 2ms | 3940 KiB | ||||
16 | Accepted | 2ms | 3772 KiB | ||||
17 | Accepted | 2ms | 3772 KiB | ||||
18 | Accepted | 2ms | 3720 KiB | ||||
19 | Accepted | 2ms | 3832 KiB | ||||
20 | Accepted | 2ms | 3988 KiB |