PROBLEM LINK:PREREQUISITES:Basic Mathematics, Modulararithematic Problem:Given a base K and number M and a String. We have to convert this string moving from left to right and output the result at every step which contains the modulus M of decimal representation of the substring encountered till now. Explanation:Starting from left, to find the value at current index, multiply the value at previous index by the given base and add the value at current index in a given string to it an take modulus M at every step.
This question is marked "community wiki".
asked 11 May '15, 23:37
