2 Comments

  1. void bac(int n)///se observa din exemple ca produsul maxim se obtine daca cele 3 ///valori sunt cat mai apropiate posibil de fiecare
    {
    int d = n/3;
    if(3*d == n)
    cout << d << " " << d << " " << d;
    else if(3*d +1 == n)
    cout << d << " " << d << " " << d+1;
    else
    cout << d << " " << d+1 << " " << d+1;
    }

    1

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *