6817 | 2023-12-19 10:36:23 | szebi1100 | Bevásárlás | cpp17 | Wrong answer 0/100 | 3ms | 3672 KiB |
#include <iostream>
using namespace std;
int main()
{
int A,B,C,ar,a,b,c,ad=1,bd=1,cd=1,l1,l2,l3;
cout << "Hany db gyumolcsle kell? (max 10)" << endl;
cin >> A>>B>>C;
a = 300;
b = 350;
c = 400;
if (A+B+C < 10)
cout << "-1";
if (A == 10)
{
ar = A*a;
ad+=10;
}
else if (B==10)
{
ar = B*b;
bd+=10;
}
else if (C==10)
{
ar = C*c;
cd+=10;
}
else
{
ad += A*ad;
bd += B*bd;
cd += C*cd;
do
{
l1=ad-1;
l2=bd-1;
l3=cd-1;
}while (ad+bd+cd==10);
ar = ad * a + bd * b + cd * c;
}
cout << ar;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 3ms | 2020 KiB | ||||
2 | Wrong answer | 3ms | 2252 KiB | ||||
3 | Wrong answer | 3ms | 2592 KiB | ||||
subtask2 | 0/10 | ||||||
4 | Wrong answer | 3ms | 2612 KiB | ||||
5 | Wrong answer | 3ms | 2700 KiB | ||||
6 | Wrong answer | 3ms | 2828 KiB | ||||
subtask3 | 0/20 | ||||||
7 | Wrong answer | 3ms | 2916 KiB | ||||
8 | Wrong answer | 3ms | 3160 KiB | ||||
9 | Wrong answer | 3ms | 3176 KiB | ||||
10 | Wrong answer | 3ms | 3284 KiB | ||||
subtask4 | 0/30 | ||||||
11 | Wrong answer | 3ms | 3284 KiB | ||||
12 | Wrong answer | 3ms | 3348 KiB | ||||
13 | Wrong answer | 3ms | 3336 KiB | ||||
14 | Wrong answer | 3ms | 3488 KiB | ||||
subtask5 | 0/40 | ||||||
15 | Wrong answer | 3ms | 3596 KiB | ||||
16 | Wrong answer | 3ms | 3580 KiB | ||||
17 | Wrong answer | 3ms | 3548 KiB | ||||
18 | Wrong answer | 3ms | 3544 KiB | ||||
19 | Wrong answer | 3ms | 3668 KiB | ||||
20 | Wrong answer | 3ms | 3672 KiB |