111

[轩辕]制造体·魁  •  10小时前


include <bits/stdc++.h>

using namespace std;

int main() {

int , sum = 1;
cin >> n;
bool f = true;

if (n ==  0) {
	cout << 0;
	return 0;

}

if (n < 0) {
	n = abs(n);
	f = false;

}

while (n > 0) {

	int a = n % 10;
	sum = sum * a;
	n = n / 10;

}

if (f == false) {
	cout << -1 * sum;
}else{
	cout<<sum;
}

//cout << sum;

return 0;

}


评论:

请先登录,才能进行评论