If I use >>> it will pass, but if I use >>, it will time exceed.
Why the performance has so much difference?
Internally the shifts work on the same mechanism with one difference ">>>" does not preserve sign i.e. MSB bit even if it is "1" using ">>>" will add a "0" at MSB, whereas ">>" preserves sign, i.e. MSB now remains "1" after shift.
If you paste your code we could debug it, maybe it's getting stuck in some kind of internal loop.