18852022-12-07 09:04:19AnnaBevásárláscpp17Accepted 100/1003ms3988 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1940 KiB
2Accepted2ms2180 KiB
3Accepted2ms2332 KiB
subtask210/10
4Accepted2ms2540 KiB
5Accepted2ms2780 KiB
6Accepted2ms2860 KiB
subtask320/20
7Accepted2ms2988 KiB
8Accepted2ms3236 KiB
9Accepted2ms3560 KiB
10Accepted2ms3608 KiB
subtask430/30
11Accepted2ms3680 KiB
12Accepted2ms3792 KiB
13Accepted2ms3676 KiB
14Accepted2ms3676 KiB
subtask540/40
15Accepted2ms3940 KiB
16Accepted2ms3772 KiB
17Accepted2ms3772 KiB
18Accepted2ms3720 KiB
19Accepted2ms3832 KiB
20Accepted2ms3988 KiB