variable to represent the number after converting it to base 5. Since the digits are be in reverse order , we traverse vector from back
result = 0 NEW_LINE for i in range ( len ( v ) - 1 , - 1 , - 1 ) : NEW_LINE INDENT result = result * 10 NEW_LINE result = result + v [ i ] NEW_LINE DEDENT