http://codeforces.net/gym/100460/problem/E
My idea for this problem is:
For every i I compute x = LCM(LCM(1...i-1), LCM(i+1...n)) (I've got these values from preprocessing) and check if x%t[i] == 0 and x > 10e9.
I have no idea what is wrong, but I keep getting WA on test #6.
Overflow maybe?
Is my idea OK?
As far as I remember, it should be.
Yeah, I got AC. I've been printing (x-m)%x as result incorrectly. Thanks.
Can you help me in it tom