Create 1792_42170.cpp

From http://codevs.cn/wiki/solution/?problem_id=1792
This commit is contained in:
Kirigaya Kazuto 2016-08-17 15:00:36 +08:00 committed by GitHub
parent 1c338bb9bd
commit cf3ca790e9

22
CodeVS/1792_42170.cpp Normal file
View File

@ -0,0 +1,22 @@
#include<cstdio>
int main()
{
int N,i;
scanf("%d",&N);
printf("%d=",N);
for(i=2;i<=N;i++)
{
while(N%i==0)
{
printf("%d",i);
N=N/i;
if(N<i)
break;
else
printf("*");
}
}
if(N==i)
printf("%d",N);
return 0;
}