A company wishes to device an order confirmation procedure.
They plan to require an extra confirmation instead of simply auto confirming
the order.For this purpose the system will generate a one time password which
will be shared to the customer. The customer who is has to enter the one time
password to confirm the order.
One time password generated for the requested order Id is
the product of digits in the order id
Input:
One integer
representing the order ID of the customer
Output:
The generated OTP
Sample input: 2342
Sample output:48
Program:
no=int(input())
list1=(list(str(no)))
list2=[int(item) for item in list1]
prod=1
for item in list2:
prod*=item
print(prod)
Post a Comment