Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
57561 | lixinyu | 求一个合数的所有质因数 | C++ | Accepted | 0 MS | 244 KB | 247 | 2024-11-24 14:08:11 |
#include<bits/stdc++.h> using namespace std; int main() { int a,n; cin>>a; for(int i=2;i<a;i++){ if(a%i==0){ n=1; for(int j=2;j<i;j++){ if(i%j==0)n=j; } if(n==1){ cout<<i<<" "; } } } return 0; }