Tuples

0

0 votes
Easy-Medium
Problem

Given set S of N distinct integers. Find total number of sextuples (a, b, c, d, e, f) such that a, b, c, d, e, f ∈ S and d ≠ 0 that satisfy
enter image description here

Input
Given integer N (number of elements). Next line contains N integers separated by a single space.

Constraints
1 <= N <= 100
-108 <= value of element <= 108

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?