【題解】ZeroJudge a148: You Cannot Pass?!

【題目敘述】https://zerojudge.tw/ShowProblem?problemid=a148

#include <iostream>
using namespace std;

int main() {
    int n;
    while (cin >> n) {
        int x, sum = 0;
        for (int i = 0; i < n; i++) {
            cin >> x;
            sum += x;
        }
        if (sum > 59 * n) {
            cout << "no\n";
        } else {
            cout << "yes\n";
        }
    }
    return 0;
}
分享本文 Share with friends