#17374: 改了好久終於 AC 的 c++ 解


d10730416@gapps.fg.tp.edu.tw (Wendy Charng)


#include <iostream>
using namespace std;

int main() {

  int n;

  while (cin >> n){
 
    int score, TotalScore = 0;
 
    for (int i = 0; i < n; i++){
      cin >> score;
      TotalScore = TotalScore + score;
    }
 
    if (TotalScore <= 59 * n){            //這裡為了避免浮點數所以不用平均值
      cout << "yes" << endl;
    }
    else {
      cout << "no" << endl;
    }
  }
}