第四行測資錯 , 求解 QAQ
#include<bits/stdc++.h>
using namespace std;
int main(){
int n = 0;
while(cin>>n){
int ary[n+1] = {0};
for(int i = 0 ; i < n ; i++){
cin>>ary[i];
ary[n]+= ary[i];
}
string str = (ary[n] >= 59*n) ? "no" : "yes" ;
cout<<str<<endl;
}
return 0;
}
string str = (ary[n] >= 59*n) ? "no" : "yes" ;
大於59分及格,剛好59分是不及格