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?
Wrong value in test case (75, 22)
vannaheim
#1
make sure to do modulo 1000000007 after each computation not just the answer. it got accepted after that.
wilfredarin
#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
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