線上C++版本與本身邊義器版本不同,紀錄
#include <iostream>
#include <string>
#include <sstream>
#include <cmath>
using namespace std;
int main()
{
string x;
int y[1000];
while (cin >> x)
{
int z=1;
for (int i = 0; i < x.length(); i++)
{
y[i] = (int)x[i] - 48;
}
if (x.length() == 1)
{
z = 0;
}
else
{
for (int i = 0; i < x.length(); i++)
{
z = z * y[i];
}
}
if (z == 0)
{
}
else
{
cout << z << endl;
}
}
}