Advertisement
Egor_1425

Untitled

Jul 12th, 2024
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n, a = 1;
  8.     cin >> n;
  9.     for (int i = 1; 2 * i <= n; i++)
  10.     {
  11.         if (n % i == 0)
  12.         {
  13.             a = i;
  14.         }
  15.     }
  16.  
  17.     cout << a << ' ' << n - a;
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement