S_h_u_v_r_o

1158

Oct 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int m=0,n,o=0,x,y,z;
  5. scanf("%d",&n);
  6. while(m<n)
  7. {
  8. m++;
  9. o=0;
  10. scanf("%d %d",&x,&y);
  11. if(x%2==0) x++;
  12. for(z=0;z<y;z++)
  13. {
  14. o+=x;
  15. x+=2;
  16. }
  17. printf("%d\n",o);
  18. }
  19.  
  20. return 0;
  21. }
Add Comment
Please, Sign In to add comment