17662022-12-02 20:47:38kdbBevásárláscpp11Accepted 100/1003ms3944 KiB
#include <iostream>
using namespace std;

int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int a, b, c, w = 10;
    cin >> a >> b >> c;
    if (a > w) a = w;
    if (b > w) b = w;
    if (c > w) c = w;
    if (a + b + c < 10) cout << -1 << endl;
    else
    {
        int q = 0;
        w -= a; q += 300 * a;
        if (b > w) b = w;
        w -= b; q += 350 * b;
        if (c > w) c = w;
        w -= c; q += 400 * c;
        cout << q << endl;
    }
    return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1928 KiB
2Accepted2ms2084 KiB
3Accepted2ms2160 KiB
subtask210/10
4Accepted2ms2388 KiB
5Accepted2ms2520 KiB
6Accepted2ms2592 KiB
subtask320/20
7Accepted2ms2792 KiB
8Accepted2ms3032 KiB
9Accepted2ms3104 KiB
10Accepted2ms3204 KiB
subtask430/30
11Accepted2ms3104 KiB
12Accepted2ms3232 KiB
13Accepted2ms3308 KiB
14Accepted2ms3312 KiB
subtask540/40
15Accepted2ms3408 KiB
16Accepted2ms3632 KiB
17Accepted2ms3536 KiB
18Accepted2ms3612 KiB
19Accepted2ms3708 KiB
20Accepted2ms3944 KiB