My code is not executing

exception in thread “main” java.util.
no such element exception…

Please share your code using https://ide.codingblocks.com/ so that I can help you debug

i shared u the email, 7 hours ago which contain my code pls check it

while (row <= n)

Change this to ‘while(row<n)’ because for input 5, the output is only till 40004. Your code is not giving an exception, I have tried it on Hackerblocks and all test cases are passing after this change.

Please mark the doubt as resolved if you have no further queries!