【思路】:水题。
【AC代码】:PS.题目中说测试数据小于6000000,但是样例又给了个超int的。。果然蓝桥杯是做过的最差的OJ。。各种问题。
#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <cstring>
using namespace std;
int alpha(long long int n)
{
int mul = 1;
while (n)
{
int temp = n%10;
if (0 != temp)
mul *= temp;
n /= 10;
}
return mul;
}
int main()
{
//freopen("in.txt", "r", stdin);
long long int n = 0;
cin >> n;
while (n > 9 )
{
n = alpha(n);
}
cout << n;
return 0;
}