eolymp
bolt
Try our new interface for solving problems
Problems

ABCDEF

ABCDEF

You are given a set \textbf{S} of integers between \textbf{-30000} and \textbf{30000} (inclusive). \includegraphics{https://static.e-olymp.com/content/a0/a01d6fe5baf86fd274dfc5600a30f76cc672dd3c.jpg} Find the total number of sixtuples (\textbf{a}, \textbf{b}, \textbf{c}, \textbf{d}, \textbf{e}, \textbf{f}) : \textbf{a}, \textbf{b}, \textbf{c}, \textbf{d}, \textbf{e}, \textbf{f} \textbf{ S}, \textbf{d} ≠ \textbf{0} that satisfy: (\textbf{a} * \textbf{b} + \textbf{c}) / \textbf{d} - \textbf{e} = \textbf{f} \InputFile The first line contains integer \textbf{n} (\textbf{1} ≤ \textbf{n} ≤ \textbf{100}), the size of a set \textbf{S}. Elements of \textbf{S} are given in the second line. Given numbers will be distinct. \OutputFile Print the total number of plausible sixtuples.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3
5 7 10
Output example #1
10