Count the unordered pairs of numbers that form a coprime pair.
Unlock detailed company stats for this questionUpgrade
Two numbers form a coprime pair if the number of common divisors between them is at most two, including 1 (apart from 1, they may share at most one additional common divisor). Given an array of integers, determine the number of unordered pairs (i, j) whose elements form a coprime pair under this definition.
Community answers
No answers contributed by the community yet.


