Proof required for SIMPLELCM problem

SIMPLE LCM

Why we have to traverse only for last few say 100 maximum elements and check all possible combinations of them only why not we are going till full n^2 in this question any theoretical intuitive or mathematical proof if anyone can explain?

That doesn’t seem correct. There’s a simple counter test. I’m guessing last 200 distinct elements, right?

explain this submission then
solution link

The total number of maximum divisors can be atmost 128 for any number as 2*3*5*7*11*13*17>10^5 . So I guess you can get an intuition from it!

1 Like

https://www.codechef.com/viewsolution/32400781
this solution fails even for 3 4 8 but it got AC