这是什么?
查看原帖
这是什么?
1007879
May_to_July楼主2025/7/27 21:12

有没有人知道这是怎么回事

#1: Wrong Answer.wrong answer Too few lines.

#include<bits/stdc++.h>
#define int long long
using namespace std;
int ys[1000],cnt;
signed main(){
	int q;
	cin>>q;
	for(int i=2;i*i<=q;i++){
		while(q%i==0){
			q/=i;
			cnt++;
			ys[cnt]=i;
		}
	}
    if(q!=1){
        cnt++;
        ys[cnt]=q;
    }
    if(cnt==1){
		cout<<1;
		return 0;
    }
	if(cnt==2){
		cout<<2;
		return 0;
	}
	cout<<1<<'\n'<<ys[1]*ys[2];
	return 0;
}
2025/7/27 21:12
加载中...