Product of Array Except Self
For each position print the product of all other elements — without using division (zeros make division fail).
Input
, then integers.
Output
products.
Constraints
; every answer fits in a 64-bit integer.
Sample 1
Input
4 1 2 3 4
Output
24 12 8 6
Sample 2
Input
5 -1 1 0 -3 3
Output
0 0 9 0 0