J - Parentheses Arrangements

Languages: C, C++, Java, Python, Kotlin
Time & Memory limits: (details)

Input

Output

Sample test(s)

Input
5 1 2 3 5 10
--- Showing first 30 lines (click "Copy" to get full content) ---
Output
1 2 5 42 16796
--- Showing first 30 lines (click "Copy" to get full content) ---