part_10 = part_10* 10 % m;
here it is done so because whenever you are going to multiply appropriate power of 10 with a number you will need its modulus in first place.
As
(A * B)%mod = (A%mod * B%mod)%mod
It should give 500000004. Also, note that pow() is slow and has bugs, better write your own function for raising to a power in log(exponent) time. Also check this
Oh is it Like in one go calculate all possible digits which can be placed at a given index and check which digits can be placed using dp and calculate it’s contribution ??
@admin there is a problem with some of ur test cases as in Python it is showing " end of file error while reading "error which is ur backend mistake I believe
@admin u can see this in the following submission CodeChef: Practical coding for everyone Most of Python users who made correct program had to face this issue please correct it and reissue the ranking
I cross checked the input format using the standard template (which asserts that all constraints are adhered to and that there are no extra characters except the one specified in input). It does not give any error related to wrong format of input (it’d throw RE:SIGBRT due to failed assert elsewise).
Thats not the error given on test files - codechef does not reveal these messages. This seems to be some error you get on custom input due to not giving an input or not giving input correctly.