Advertisement
Misha_

Задание 27 досрок

Apr 21st, 2019
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int a = 0, b = 0, c = 0, d = 0, res = 0, n, t;
  6.     cin >> n;
  7.     for (int i = 0; i < n; ++i) {
  8.         cin >> t;
  9.         if (t % 62 == 0) {
  10.             ++a;
  11.             continue;
  12.         }
  13.         if (t % 31 == 0) {
  14.             ++b;
  15.             continue;
  16.         }
  17.         if (t % 2 == 0) {
  18.             ++c;
  19.             continue;
  20.         }
  21.         ++d;
  22.     }
  23.     res = (2*(n-1)+(a-1)*(-1))/2*a + (b*c);
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement