Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int x,y=1,d=2,p;
- cin>>x;
- while(x>1){
- p=0;
- while(x%d==0){
- p++;
- x=x/d;
- }
- if(p!=0){
- y=y*d;
- }
- d++;
- }
- cout<<y;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement