I am unable to understand the solution for question C. Fadi and LCM.
Link for solution
http://codeforces.com/blog/entry/72950
C. Fadi and LCM
Hi @ravig8233
for(ll i = 1 ; i * i <= x ; i++){
if(x % i == 0 && lcm(i, x / i) == x){
ans = i;
}
}
see in this question’s solution we are checking if x is divisible by i (in range 1 to x^1/2) and lcm of i and x/i is equal to x then we get your ans.