Please read the new rule regarding the restriction on the use of AI tools. ×

Sai_D_Coder's blog

By Sai_D_Coder, 23 months ago, In English

Hi guys, I'm solving this problem and this is my code/submission. I'm getting WA for the test case 6. The test case is running fine on both my local computer and as well as Codeforces java Compiler but I'm getting WA when I submit the solution. Can someone help me why is this happening.

Test Case:

Thanks in advance

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
23 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Your getting WA because of integer overflow, use Long instead of Integer. AC: 177302462