/*
2020/4/18
第二遍
*/
#include<stdio.h>
int fun(int n)
{
if(n == 0 || n == 1)
return 1;
else
return n*fun(n-1);
}
int main()
{
int n;
int temp;
scanf("%d",&n);
int sum = 0;
temp = n;
while(n)
{
sum = sum + fun(n%10);
if(n/10 == 0)
printf("%d!=",n%10);
else
printf("%d!+",n%10);
n/=10;
}
printf("%d\n",sum);
if(sum == temp)
printf("YES\n");
else
printf("NO\n");
return 0;
}
/*
145
5!+4!+1!=145
YES
1400
0!+0!+4!+1!=27
NO
*/
2014-1
最新推荐文章于 2020-04-25 15:18:01 发布