Advertisement
STANAANDREY

bacT14 sIII 1

May 24th, 2021
990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. void perechi(int n) {
  6.     bool e = false;
  7.     for (int d1 = 1; d1 * d1 <= n; d1++) {
  8.         if (n % d1 == 0) {
  9.             int d2 = n / d1;
  10.             if (d1 % 2 != d2 % 2) {
  11.                 e = true;
  12.                 cout << '[' << d1 << ' ' << d2 << ']';
  13.             }
  14.         }
  15.     }
  16.     if (!e) {
  17.         cout << "nu exista" << endl;
  18.     }
  19. }
  20.  
  21. int main() {
  22.     //call here
  23.     return 0;
  24. }
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement