这道题目我尝试了好几遍,样例全对只有60分(后面成功了),但样例不通过却AC了。
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d,e,f;
cin>>a>>b>>c>>d>>e>>f;
if((a>60 and b>60 and c>60) || (a>60 and b>60 and c<60) || (a>60 and b<60 and c>60) || (a<60 and b>60 and c>60))
cout<<"PASS"<<endl;
else
cout<<"FAIL"<<endl;
if((a*d+b*e+c*f)/(d+e+f)>60)
cout<<"PASS"<<endl;
else
cout<<"FAIL"<<endl;
return 0;
}
这很明显,连第一个样例也过不了