fork(9) download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int test,i,n,k;
  5. scanf("%d", &test);
  6. while(test--){
  7. scanf("%d %d",&n,&k);
  8. if(k > (n/2))
  9. printf("-1\n");
  10. else if(k==1 && n==1)
  11. printf("1\n");
  12. else{
  13. for(i=1; i<=k ;i++)
  14. printf("%d ", 2*i);
  15. printf("\n");
  16. }
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 2856KB
stdin
2
100 3
100 100
stdout
2 4 6 
-1