Sample Input Problem 3rd Test Case is always failing

No matter whatever changes I do in my code 3rd test case always fails.What is actually covered by 3rd test case ? Is there any corner cases I am missing ?

Problem Link - https://hack.codingblocks.com/contests/c/588/58

Solution I tried - https://ide.codingblocks.com/s/69997

Hi sanjoy,just delete scn.nextLine() and scn.close() from your code.These are not required here.