1111

情話 · 发布于 2026-03-29 · 浏览 151 回复 0

include

include

using namespace std;

int main() {

int n;
int num = 1;
bool single = false;
cin >> n;

if (n == 0) {
	cout << n;
	goto end;
} else if (n < 0) {
	single = true;
	n = abs(n);
}

while (n) {
	num *= n % 10;
	n /= 10;
}
if (single) {
	cout << -num << endl;
} else {
	cout << num << endl;
}

end:

return 0;

}

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复