|
|
back to boardtest 10......sad.... Posted by xinxin 9 Oct 2016 16:25 #include "stdio.h" #include "stdlib.h" #include<string.h> int main() { long int m,n,sum=0,a[3001]; scanf("%ld %ld",&n,&m); for(int i=1;i<=m;i++) { scanf("%d",&a[i]); } n=n*3; for(int i=1;i<=m;i++) { sum+=a[i]; if(sum>=n) { printf("Free after %d times.",i); return 0; } } printf("Team.GOV!"); } |
|
|