Advertisement
Josif_tepe

Untitled

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