It says wrong answer and giving wrong output when I am pressing the test button but when I am putting the same input as custom test case it is giving the right output.Any idea why this is happening and how to resolve it?


#1

5163490394499093221199401898020270545859326357520618953580237168826696965537789565062429676962877038781708385575876312877941367557410101383684194057405018861234394660905712238428675120866930196204792703765204322329401298924190
The above test case is giving output 1 when I am pressing the submit or test button but it is showing the correct output that is 1 when I am giving it as a custom test case input


#2

I was also facing same issue.
Instead of using dp global array, I passed dp array as reference in function.