New users can only put 2 links in a post.Hostel Visit All Test Cased Not passing

I have written the following code. But all the test cases are not passing. Can you point out where is the mistake?

@ayanchatterjee987 Take x1 and x2 in long datatype since it can be large. Remember to change sc.nextInt() to sc.nextLong() also.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.