[ZJ]a148. You Cannot Pass?!
題目:
http://zerojudge.tw/ShowProblem?problemid=a148
------------------------------------------------------------------------------
#include<cstdio>
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
long long int a,sum =0 ;
for (int i=0 ;i<n;i++)
scanf("%d",&a),sum += a;
printf("%s\n",(sum <=n *59 ?"yes" :"no" ));
}
return 0;
}
http://zerojudge.tw/ShowProblem?problemid=a148
------------------------------------------------------------------------------
#include<cstdio>
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
long long int a,sum =0 ;
for (int i=0 ;i<n;i++)
scanf("%d",&a),sum += a;
printf("%s\n",(sum <=n *59 ?"yes" :"no" ));
}
return 0;
}
留言
張貼留言