Guest User

Untitled

a guest
Feb 21st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n,m,p,i,c;
  6.     scanf("%d%d",&n,&m);
  7.     p=1;c=1;
  8.     for (i=1;i<=m;i++)
  9.     {
  10.         p*=(n+c*m*i);
  11.         c*=(-1);
  12.     }
  13.     printf("%d\n",p);
  14.     return 0;
  15. }
Add Comment
Please, Sign In to add comment