Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int m=0,n,o=0,x,y,z;
- scanf("%d",&n);
- while(m<n)
- {
- m++;
- o=0;
- scanf("%d %d",&x,&y);
- if(x%2==0) x++;
- for(z=0;z<y;z++)
- {
- o+=x;
- x+=2;
- }
- printf("%d\n",o);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment