Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k34 = k17 = k2 = k = res = 0;
- cin >> n;
- for (int i=0; i<n;i++)
- cin >> x;
- if (x % 34 == 0)
- k34 += 1;
- else if (x % 17 == 0)
- k17 += 1;
- else if (x % 2 == 0)
- k2 += 1;
- else
- k += 1;
- cout << n * (n - 1) / 2 - k34 * (n - 1) - k17 * k2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement