|
|
вернуться в форумMy code #include <stdio.h> int main() { long long n, s; int m; scanf("%lld%d",&n,&m); n*=(long long)3; s=0; for(int i=0; i<m; i++) { int t; scanf("%d",&t); s+=t; if(s>n) { printf("Free after %d times.",i+1); return 0; } } printf("Team.GOV!"); return 0; } Works fine on my machine under Linux (g++ 4.8.2). On the OnlineJudge I get WA1 on g++ and AC on VC++ 2010. I think something is wrong. %lld doesn't work for MinGW GCC. Use %I64d |
|
|