0_0_16612116_217.c: In function 'main':
0_0_16612116_217.c:2:210: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
typedef long long LL;const LL m=1e9+7;int main(){LL n,k,T;scanf("%lld",&T);while(T--){scanf("%lld %lld",&n,&k);LL a = (2*n-k*(k-1))/(2*k);LL s=(a+a+k-1)*k/2;LL c=n-s;LL ans=1;if(a<=0){printf("-1\n");continue;}for(LL i = a+k-1;i>=a;i--){if(c){ans=(ans*(i+1))%m;c--;}else ans=(ans*i)%m;}printf("%lld\n",ans);}}
^
0_0_16612116_217.c:2:210: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
|