Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- struct pii{
- int64_t a, b;
- };
- vector <pii> factorise(int64_t n){
- vector<pii>
- for (int64_t i = 2; i * i <= n; i++){
- if (n % i > 0){
- continue;
- }
- res.push_back({i, 0});
- while (n % i == 0){
- ++res.back().b;
- n /= i;
- }
- }
- if (n > 1){
- res.push_back({n, 1});
- }
- return res;
- }
- int main(){
- ios::sync_with_stdio(false);
- cin.tie(0);
- int64_t n;
- cin >> n;
- vector<pii> divs = factorise(n);
- for (pii )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement