This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

Последен тест#

#include <iostream>

using namespace std;

int main()
{
    double d=0;
    int i,a1,a2,a3,a4,o,pr;
    cin>>o;
    if(o==2) pr=60;
    else if(o==3) pr=70;
    else if(o==4) pr=80;
    else pr=90;
    cin>>a1>>a2>>a3>>a4;
    d=(a1+a2+a3+a4);
    for(i=0;i<=100;i++)
    {
        d+=i;
        if(d/5>=pr)
        {
            cout<<i<<endl;
            return 0;
        }
        d-=i;
    }
    cout<<"GRESHKA"<<endl;
    return 0;
}

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
cpp
main.cpp 2.9 kB 1 20-Aug-2015 17:35 filip_bujaroski Множење, Олимпијада
« This particular version was published on 20-Aug-2015 17:35 by bedzo.