11785 | 2024-11-10 18:35:54 | AGergo | Bevásárlás | cpp17 | Accepted 100/100 | 1ms | 512 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
cin.tie(0);
iostream::sync_with_stdio(0);
int a, b, c;
cin >> a >> b >> c; //A-300 B-350 C-400
if(a+b+c<10)
{
cout << "-1";
}
else
{
if(a>=10)
{
cout << 3000;
}
else if(a+b>=10)
{
cout << a*300 + (10-a)*350;
}
else
{
cout << a*300 + b*350 + (10-a-b)*400;
}
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 320 KiB | ||||
2 | Accepted | 1ms | 320 KiB | ||||
3 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 10/10 | ||||||
4 | Accepted | 1ms | 320 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
subtask3 | 20/20 | ||||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
subtask4 | 30/30 | ||||||
11 | Accepted | 1ms | 320 KiB | ||||
12 | Accepted | 1ms | 320 KiB | ||||
13 | Accepted | 1ms | 320 KiB | ||||
14 | Accepted | 1ms | 320 KiB | ||||
subtask5 | 40/40 | ||||||
15 | Accepted | 1ms | 320 KiB | ||||
16 | Accepted | 1ms | 320 KiB | ||||
17 | Accepted | 1ms | 320 KiB | ||||
18 | Accepted | 1ms | 512 KiB | ||||
19 | Accepted | 1ms | 320 KiB | ||||
20 | Accepted | 1ms | 500 KiB |