/*
思路:
思路一:1. 判断是否是质数
*/
#include <bits/stdc++.h>
using namespace std;
int function_find(int n) {
if ( n == 1 ) {
cout << 1 << endl;
return 1;
}
for ( int i = 2; i <= sqrt(n)+1; i++ )//循环判断是否是质数 (1 >> 根号n)
if ( n % i == 0 ) {
cout << (n/i) << endl;
return 1;
}
cout << "YES" << endl;
return 1;
}
int main()
{
int n;
cin >> n;
function_find(n);
return 0;
}
0 回复
0 转发
0 喜欢
6 阅读



