Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int a = 0, b = 0, c = 0, d = 0, res = 0, n, t;
- cin >> n;
- for (int i = 0; i < n; ++i) {
- cin >> t;
- if (t % 62 == 0) {
- ++a;
- continue;
- }
- if (t % 31 == 0) {
- ++b;
- continue;
- }
- if (t % 2 == 0) {
- ++c;
- continue;
- }
- ++d;
- }
- res = (2*(n-1)+(a-1)*(-1))/2*a + (b*c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement