6818 | 2023-12-19 10:36:48 | BusMark | Bevásárlás | cpp17 | Wrong answer 0/100 | 600ms | 3524 KiB |
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int A, B, C;
int a=300, b=350, c=400, ar;
int db=0, kell;
cin >> A >> B >> C;
if(A + B + C <10)
cout << "-1";
else
{
while (db < 10)
{
if (A >= 10)
ar = 10*a;
else if (B >= 10)
ar = 10*b;
else if (C >= 10)
ar = 10*c;
else
{
ar = A*a;
db += A;
if (B >= 10-db)
{
ar = ar + (10-db)*b;
}
}
}
}
cout << ar;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 1876 KiB | ||||
2 | Wrong answer | 3ms | 2124 KiB | ||||
3 | Time limit exceeded | 600ms | 2252 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Time limit exceeded | 578ms | 2340 KiB | ||||
5 | Time limit exceeded | 565ms | 2580 KiB | ||||
6 | Time limit exceeded | 546ms | 1988 KiB | ||||
subtask3 | 0/20 | ||||||
7 | Time limit exceeded | 546ms | 2796 KiB | ||||
8 | Time limit exceeded | 554ms | 2648 KiB | ||||
9 | Wrong answer | 3ms | 2676 KiB | ||||
10 | Wrong answer | 3ms | 2800 KiB | ||||
subtask4 | 0/30 | ||||||
11 | Time limit exceeded | 598ms | 2860 KiB | ||||
12 | Wrong answer | 3ms | 3016 KiB | ||||
13 | Time limit exceeded | 600ms | 3200 KiB | ||||
14 | Time limit exceeded | 561ms | 3284 KiB | ||||
subtask5 | 0/40 | ||||||
15 | Time limit exceeded | 559ms | 2684 KiB | ||||
16 | Wrong answer | 3ms | 3508 KiB | ||||
17 | Wrong answer | 3ms | 3524 KiB | ||||
18 | Wrong answer | 3ms | 3524 KiB | ||||
19 | Wrong answer | 3ms | 3520 KiB | ||||
20 | Time limit exceeded | 600ms | 3496 KiB |