Code Festival A If you cannot solve this by thunder

#include <iostream>
using namespace std;
main(){while(true){
    int n=NULL;cin>>n;if(n==NULL)true;
    int a;cin>>a;
    int sum=a;
    for(int i=1;i<n;i++){int t;cin>>t;sum+=t;}
    cout<<((a<=sum/n/2)?"Fail":"Pass")<<endl;
    }
}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page