Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- long long n;
- cin >> n;
- for (int del = 2; del <= n; del++) {
- while (n % del == 0) {
- cout << del << " ";
- n /= del;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment