68182023-12-19 10:36:48BusMarkBevásárláscpp17Wrong answer 0/100600ms3524 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;

}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer3ms1876 KiB
2Wrong answer3ms2124 KiB
3Time limit exceeded600ms2252 KiB
subtask20/10
4Time limit exceeded578ms2340 KiB
5Time limit exceeded565ms2580 KiB
6Time limit exceeded546ms1988 KiB
subtask30/20
7Time limit exceeded546ms2796 KiB
8Time limit exceeded554ms2648 KiB
9Wrong answer3ms2676 KiB
10Wrong answer3ms2800 KiB
subtask40/30
11Time limit exceeded598ms2860 KiB
12Wrong answer3ms3016 KiB
13Time limit exceeded600ms3200 KiB
14Time limit exceeded561ms3284 KiB
subtask50/40
15Time limit exceeded559ms2684 KiB
16Wrong answer3ms3508 KiB
17Wrong answer3ms3524 KiB
18Wrong answer3ms3524 KiB
19Wrong answer3ms3520 KiB
20Time limit exceeded600ms3496 KiB