Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main()
- {
- long long x, n;
- cin >> x >> n;
- for(int i = 0; i < n; i += 1) {
- long long najgolem_delitel = 1;
- for(long long j = 1; j < x; j += 1) {
- if(x % j == 0) {
- najgolem_delitel = j;
- }
- }
- x += najgolem_delitel;
- }
- cout << x << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement