Find Nth positive number whose digital root is X | Function to find the N - th number with digital root as X ; Driver Code
def findAnswer ( X , N ) : NEW_LINE INDENT return ( N - 1 ) * 9 + X ; NEW_LINE DEDENT X = 7 ; NEW_LINE N = 43 ; NEW_LINE print ( findAnswer ( X , N ) ) ; NEW_LINE