Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
158044 | 林泽豪 | 质因数分解 | C++ | 运行出错 | 0 | 0 MS | 88 KB | 273 | 2024-07-21 18:23:20 |
#include<bits/stdc++.h> using namespace std; const int N=2e8+10; bool prime[N];int n; int main (){ cin>>n; for(int i=2;i<=sqrt(n);i++){ if(!prime[i]){ for(int j=i<<1;j<=sqrt(n);j+=i)prime[j]=1; if(n%i==0){ cout<<n/i; return 0; } } } }