I try to deal with this problem in JS. There is no Integer type in JS.
I try to deal with this problem by using Number.MAX_SAFE_INTEGER in JS, but It will throw error at test case 1534236469. I checked on MDN and found JS Number.MAX_SAFE_INTEGER is 2^53 - 1.
Dose anyone got AC ? Should I change to any numbers are bigger than 2^31 - 1 or smaller than -2^31 - 1 to 0 manually? That is weird.