18862022-12-07 09:08:15AnnaBevásárláscpp17Accepted 100/1003ms4064 KiB


#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stdio.h>
#include <stdlib.h>

int main()
{
    int A, B, C;
    int arA = 300, arB = 350, arC = 400, db = 10;
    scanf("%d %d %d\n", &A, &B, &C);
    if (A + B + C < db)
    {
        printf("-1");
        return 0;
    }
    else if (A + B < db)
    {
        printf("%d", A * arA + B * arB + (db - (A + B)) * arC);
        return 0;
    }
    else if (A < db)
    {
        printf("%d", A * arA + (db - A) * arB);
        return 0;
    }
    else
    {
        printf("3000");
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1940 KiB
2Accepted2ms2132 KiB
3Accepted2ms2484 KiB
subtask210/10
4Accepted2ms2620 KiB
5Accepted2ms2820 KiB
6Accepted2ms2980 KiB
subtask320/20
7Accepted2ms3124 KiB
8Accepted2ms3188 KiB
9Accepted2ms3388 KiB
10Accepted2ms3388 KiB
subtask430/30
11Accepted2ms3392 KiB
12Accepted2ms3492 KiB
13Accepted2ms3376 KiB
14Accepted2ms3508 KiB
subtask540/40
15Accepted2ms3624 KiB
16Accepted2ms3824 KiB
17Accepted2ms3916 KiB
18Accepted2ms3992 KiB
19Accepted2ms3936 KiB
20Accepted2ms4064 KiB