ABCDEF
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
You are given a set S of integers between -30000 and 30000 (inclusive).
Find the total number of sixtuples (a, b, c, d, e, f) : a, b, c, d, e, f S, d ≠ 0 that satisfy:
(a * b + c) / d - e = f
Input
The first line contains integer n (1 ≤ n ≤ 100), the size of a set S. Elements of S are given in the second line. Given numbers will be distinct.
Output
Print the total number of plausible sixtuples.
Examples
Input #1
Answer #1
Submissions 777
Acceptance rate 31%