文章
19
粉丝
0
获赞
4
访问
11.3k
#include<bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
if (n == 2 || n == 3) {
cout << n << endl;
return 0;
}
int arr[101] = { 0 };
for (int i = 2; i <= sqrt(n); i++) {
int temp = i;
while (n % temp == 0) {
arr[i]++;
temp++;
}
}
int max = arr[2];
int index = 2;
for (int i = 3; i <= sqrt(n); i++) {
if (arr[i] > max) {
max = arr[i];...
登录后发布评论
暂无评论,来抢沙发