Advertisement
Josif_tepe

Untitled

Jun 17th, 2023
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <set>
  3. #include <cstring>
  4. #include <vector>
  5. using namespace std;
  6. const int maxn = 1e5 + 10;
  7. typedef long long ll;
  8.  
  9. vector<ll> prime_divisors(ll n) {
  10.     vector<ll> res;
  11.     ll i = 2;
  12.     while(i * i <= n) {
  13.         if(n % i == 0) {
  14.             res.push_back(i);
  15.             while(n % i == 0) {
  16.                 n /= i;
  17.             }
  18.         }
  19.         i++;
  20.     }
  21.     if(n > 1) {
  22.         res.push_back(n);
  23.     }
  24.     return res;
  25. }
  26. int main() {
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement