Getting wrong answer.Tried all test cases, 1 70 70 also giving right answer. mod is handled prooperly I used MEM and make a 3d matrix for my sequence with sum.
EDIT: Got Accpeted. Thanks
Try this
1 1 10
Its giving 142 which is right
Then what’s the answer for
1 0 10
They should be the same right? As the only difference from the previous test case is adding the 0’th term, which is zero.
But anyway, you got accepted.