Value required to be added to N to obtain the sum of first M multiples of K | Function to print the value to be added to N to obtain sum of first M multiples of K ; Store the sum of the first M multiples of K ; Store the value to be added to obtain N ; Input
def printNumber ( N , K , M ) : NEW_LINE INDENT sum = K * ( M * ( M + 1 ) / 2 ) NEW_LINE return sum - N NEW_LINE DEDENT N = 17 NEW_LINE K = 3 NEW_LINE M = 4 NEW_LINE print ( int ( printNumber ( N , K , M ) ) ) NEW_LINE