https://discuss.codechef.com/t/randchcl-editorial/57803
This is the link for the editorial of the problem where u can find the problem link too?
Doubt in editorialist’s explaination
why score is k^2*expected value(gcd(a[i],a[j]))?
Can anyone explain relation between expected value and score expression?