Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
1259 | Jerry | 质因数分解 | C++ | Wrong Answer | 0 MS | 244 KB | 262 | 2022-11-21 19:30:36 |
#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,x; cin>>x; for (int i=2;i<=x/2;i++){ for (int j=2;j<=x/2;j++){ if (0!=i%j&&a==0){ b=i; }else if (0!=i%j&&a==0){ a=i; } } } cout<<max(a,b); return 0; }