Supermarket Scanner — Product of All Digits

E · easyP · Verified PYQ

A product has code N printed on it. The price = product (multiplication) of all digits of N. Given N, compute and print the price.

Input
5244
Output
160
for ch in str(N): product \*= int(ch). Works for any length.
5*2*4\*4 = 160
← Sum of Prime Numbers up to NToggle All Bits After MSB (Including MSB) →
Report an issue with this question