一本通1098

//qf
#include<bits/stdc++.h>
using namespace std;
int n;
int ans;
inline bool isprime(int x){
	if(x==1) return false;
	if(x==2) return true;
	for(register int i=2;i<=sqrt(x);i++) if(x%i==0) return false;
	return true;
}
signed main(){
	cin>>n;
	for(register int i=2;i<=sqrt(n);i++)
	if(n%i==0 and isprime(i)) ans=max(i,n/i);
	cout<<ans<<endl;
	return 0;
}
posted @ 2019-04-12 21:57  Isaunoya  阅读(283)  评论(0编辑  收藏  举报
TOP