Skip to content

Instantly share code, notes, and snippets.

@hhc0null
Created March 3, 2012 08:22
Show Gist options
  • Save hhc0null/1964977 to your computer and use it in GitHub Desktop.
Save hhc0null/1964977 to your computer and use it in GitHub Desktop.
CTPC-A-Average.cpp
#include <cstdio>
int main() {
int a[4] = {0};
int sum = 0, max = 0;
for(int i = 0; i < 4; i++) {
scanf("%d", &a[i]);
max = (max < a[i])? a[i]: max;
sum += a[i];
}
if(((sum + max) / 5) >= 60)
printf("Yes\n");
else
printf("No\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment