#34060: 這是錯在哪裡 一直tle


thomas930512 (s1113314)


#include<iostream>
using namespace std;
 int main() {
    int n;
    cin >> n;
    double total = 0.0;
    for(int i = n;i>0;i--)
    {
        int grade;
        cin >> grade;
        total += grade;
    }
    if (total / n > 59    )
    {
        cout << "no" <<endl;
    }
    else
    {
        cout << "yes" << endl;
    }
    return main();
}

#34064: Re: 這是錯在哪裡 一直tle


cges30901 (cges30901)


#include
using namespace std;
 int main() {
    int n;
    cin >> n;
    double total = 0.0;
    for(int i = n;i>0;i--)
    {
        int grade;
        cin >> grade;
        total += grade;
    }
    if (total / n > 59    )
    {
        cout << "no" <    }
    else
    {
        cout << "yes" << endl;
    }
    return main();
}


讀到EOF要中止程式