黑不拉几
查看原帖
黑不拉几
1032871
QAQ_liu楼主2024/10/25 17:46
#include<bits/stdc++.h>
#define int long long
using namespace std;
int n;
signed main(){
	ios::sync_with_stdio(0);//f*** TLE
	cin.tie(0),cout.tie(0);
	cin>>n;
	while(n--){
		int x;
		cin>>x;
		while(x!=1){
			for(int i=2;;i++){
				if(x%i==0){
					cout<<i<<" ";
					x/=i;
					break;
				}
			}
		}
		cout<<"\n";
	}
    return 0;
}
2024/10/25 17:46
加载中...