Wrong value in test case (75, 22)


#1

Answer returned is 261079935; expected is 478432066. Works for other test cases, and passes base test.
Mention: everything appropriately declared as unsigned long long, and moded - as per problem statement before final answer was returned. Any hints as to what’s going wrong here?


#2

same problem for me too. did you get the solution?


#3

same problem. i think there is a bug in test case. plz resolve this issue.


#4

make sure to do modulo 1000000007 after each computation not just the answer. it got accepted after that.


#5

Make sure you are using result mod 1000000007


#6

The test case is fine. It’s all about the mod.


#7

I had the same problem :
Because I was a using hash_map to store my function calls
I was using a wrong key :
key = str(id)+str(sum) i.e. if id = 11 sum == 211 my key was 11211
Now this is obviously wrong as id==112 and sum 11 for this my key is again same !!

so I corrected it key = 11_211


#8

Try swapping the values of A and B,
this worked for me ;p
It is not clearly mentioned in the arguments, which one depicts sum and which depicts the num of digits, probably, you might have interchangeably used them