this is the link to my code.
I can’t seem to find the problem with my code
but still I getting the wrong ans to the 3rd sample test case even.
could you help me figure it out.
this is the link to my code.
I can’t seem to find the problem with my code
but still I getting the wrong ans to the 3rd sample test case even.
could you help me figure it out.
The reason you are getting wrong for the 3rd test case is because you are taking mod with 1000000007 whereas it is mentioned in the question as 10^9. The first three test cases are passing because they are smaller than 10^9 hence mod with any bigger number gives the same output.