Advertisement
Josif_tepe

Untitled

Mar 9th, 2023
701
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int main()
  5. {
  6.     int a, b, c, d;
  7.     cin >> a >> b >> c >> d;
  8.     int deliteli = 0;
  9.     int deliteli2 = 0;
  10.     for(int i = 1; i <= a + b; i++) {
  11.         if((a + b) % i == 0) {
  12.             deliteli++;
  13.         }
  14.     }
  15.     for(int i = 1; i <= c + d; i++) {
  16.         if((c + d) % i == 0) {
  17.             deliteli2++;
  18.         }
  19.     }
  20.     if(deliteli > deliteli2) {
  21.         cout << "ONE" << endl;
  22.     }
  23.     else {
  24.         cout << "TWO" << endl;
  25.     }
  26.     return 0;
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement