| 比赛 | 图的简单问题 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 质因数分解 | 最终得分 | 100 |
| 用户昵称 | REALIZE_BEYOND | 运行时间 | 0.005 s |
| 代码语言 | C++ | 内存使用 | 0.29 MiB |
| 提交时间 | 2017-05-14 20:46:27 | ||
#include<cstdio>
#include<cmath>
using namespace std;
int s(int x)
{
for(int i=2;i<=sqrt(x)+1;i++)
if(x%i==0)
{
x/=i;
break;
}
return x;
}
void output(int x)
{
printf("%d",x);
}
int main()
{
freopen("prime.in","r",stdin);
freopen("prime.out","w",stdout);
long long int x;
scanf("%lld",&x);
output(s(x));
return 0;
}