68172023-12-19 10:36:23szebi1100Bevásárláscpp17Wrong answer 0/1003ms3672 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;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms2020 KiB
2Wrong answer3ms2252 KiB
3Wrong answer3ms2592 KiB
subtask20/10
4Wrong answer3ms2612 KiB
5Wrong answer3ms2700 KiB
6Wrong answer3ms2828 KiB
subtask30/20
7Wrong answer3ms2916 KiB
8Wrong answer3ms3160 KiB
9Wrong answer3ms3176 KiB
10Wrong answer3ms3284 KiB
subtask40/30
11Wrong answer3ms3284 KiB
12Wrong answer3ms3348 KiB
13Wrong answer3ms3336 KiB
14Wrong answer3ms3488 KiB
subtask50/40
15Wrong answer3ms3596 KiB
16Wrong answer3ms3580 KiB
17Wrong answer3ms3548 KiB
18Wrong answer3ms3544 KiB
19Wrong answer3ms3668 KiB
20Wrong answer3ms3672 KiB