Utkarsh and LCM
All submissions for this problem are available.
Utkarsh found an array A of size N. He needs to report the number of pairs (i,j) where i < j such that
LCM (A[i], A[j]) > min (A[i], A[j])
- 1 <= N <= 10^6
- 1 <= A[i] <= 10^6
First line contains N.
Next line contains N integers of A.
output a single integer, the answer to the problem
1 1 2 3
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA|
Fetching successful submissions