Advertisement
Guest User

Untitled

a guest
Nov 17th, 2012
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.  int n,kk1 = 0, kk2 = 0;
  2.     scanf("%d", &n);
  3.     for (int i = 0; i < n; i++) {
  4.         int num;
  5.         scanf("%d", &num);
  6.         if (num%2 == 0) kk1++;
  7.         else kk2++;
  8.     }
  9.     ll res = kk1*kk2;
  10.     printf("%lld", res);
  11.     return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement