**Before watching this make sure that you’ve tried enough**
#include<stdio.h> int main() { int n,i = 1, j, k = 0, X, Y; scanf("%d", &n); for(i = 0;i < n;i++){ scanf("%d %d", &X, &Y); if(X%2==0)X++; for(j = 0;j < Y;j++){ k += X; X += 2;; } printf("%d\n",k); k=0; } return 0; }
If this solution helped you, please share this with your friends.
And if you have anything to say, let me know in the comment section.
More solutions are coming so Like our Facebook page and Subscribe to our YouTube channel to stay connected.