Last active
November 5, 2019 08:44
-
-
Save pinglunliao/130c62d10a37c7444377 to your computer and use it in GitHub Desktop.
a148: You Cannot Pass?! FYI: https://yunlinsong.blogspot.com/2015/02/you-cannot-pass.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
#include <cstdio> | |
using namespace std; | |
int main(void){ | |
int num = 0; | |
float score = 0; | |
double average = 0.0; | |
while(scanf("%d", &num) != EOF) | |
{ | |
average = 0.0; | |
for(int i = 1; i <= num; i++) | |
{ | |
scanf("%f", &score); | |
average += (score / num); | |
//printf("average:%lf\n", average); | |
} | |
if( average > 59) | |
printf("no\n"); | |
else | |
printf("yes\n"); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment