CT421

Sable's coins Product

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

In the garden city of Petalbrook, Sable the factor keeps careful count of the coins. rebuild the damaged itinerary, every figure matters. Task: Read n integers and print their product. Input format: First line: n. Second line: n space-separated integers. Output format: Print the product of all n values. Constraints: 1 <= n <= 15; 1 <= a[i] <= 5; the product fits a signed 64-bit integer.

Example 1:

Input: 4 2 4 3 1
Output: 24

Example 2:

Input: 6 2 3 4 5 4 1
Output: 480

Example 3:

Input: 10 3 2 3 2 3 5 1 1 2 1
Output: 1080

Constraints:

1 <= n <= 15; 1 <= a[i] <= 5; the product fits a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.