Test Case 1 : Wrong Answer

Question link : https://online.codingblocks.com/app/player/213153/content/213766/5167/code-challenge

My Solution : https://ide.codingblocks.com/s/653222

Failing 1 test case(test case 1), How to fix ?
Do I have to use BigInteger ? if yes, why ???

Hey @mail2aqibahmed_23714997a14745bb Bro on line number 5 you have taken long variable which is correct but you have used nextInt() instead of this you have to use nextLong(); to get long input.

oh! yes, changed to nextLong();
but still failing test case 1…

@pssharma1410

Hey @mail2aqibahmed_23714997a14745bb for n = 6
your code is giving and 8 and 91 but it has to be 8 and 10.

@pssharma1410 Got it thanks again :smile:

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.