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