Can anyone please tell me what I’m doing wrong? Solution

Please don’t tell the logic just provide me a test case for which my solution is giving WA.

Here’s the question question

Can anyone please tell me what I’m doing wrong? Solution

Please don’t tell the logic just provide me a test case for which my solution is giving WA.

Here’s the question question

Hey @kunnu120,

One possible mistake would be use of int as it would overflow easily. try using long [10^6*(10^6-1) ~~ 10^12].

Hope this helps!

1 Like

thank you so much, now I got it!!

Sorry, I’m not that familiar with Java.

Okay, that’s fine, thanks for the help though!!