Company: Dell
Difficulty: medium
Unique Fractions Counter Given an array A of integers, determine the count of unique fractions that can be formed using pairs of these integers as the numerator and denominator. Fractions are considered equivalent if they simplify to different values in their lowest terms. For example, 4/2 and 2/1 are equivalent and should only be counted once. Note that a same positional element for both numerator and denominator cannot be considered (e.g., 2/2 is not considered) but if there are duplicates in array they are considered different elements. Input Format The first line of input contains an integer representing size of array. Second line of input contains n space separated integer representing elements of array A. Output Format Output contains an integer representing the count of unique fractions that can be formed from the given array. Sample Testcase #0 Input: 5 1 3 7 9 3 Output: 11