#include <stdio.h>
int main(){
int n,s,i;
float x, a;
scanf("%d",&n);
a=0;
for(i=1;i<=n;++i){
scanf(" %d",&s);
a+=s;
}
x = a/n;
if(x>59)
printf("no");
else
printf("yes");
return 0;
}
#include
int main(){
int n,s,i;
float x, a;
scanf("%d",&n);
a=0;
for(i=1;i<=n;++i){
scanf(" %d",&s);
a+=s;
}
x = a/n;
if(x>59)
printf("no");
else
printf("yes");
return 0;
}
有多筆測資,所以要用 while(scanf("%d",&n)!=EOF) 這種寫法