[11:31 AM, 8/8/2021] Aafaq: Khaled has an array A of N elements. He wants to choose two distinct elements from
the array.
But Khaled hates prime numbers, so he provided a restriction over the two numbers
The restriction is that the greatest common divisor (GCD) of the two numbers must not
be a prime number. Note that (i, j) and (, i) are considered the same way.
Could you help haled find the number of ways in which he can choose two elements
from the array such that their greatest common divisor is not a prime number?
[11:32 AM, 8/8/2021] Aafaq: Note: Since the answer might be large, output it modulo 10 ^ 9 + 7.
Input Format
The first line contains an integer, N, denoting the number of elements in A
Each line i of the N subsequent lines (where O si < N) contains an integer describing
Ai.
Constraints
1 <= N <= 10^6
1 <= A(j <= 10^6
Answers
Answered by
2
Answer:
Photography is the art, application, and practice of creating durable images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film.
Explanation:
improper question
Similar questions