One more solution in Python


  • -1
    W

    My solution is:

    def re (x):
    st = str(x)
    mi = list(st)
    rmi = mi.reverse()
    final = []
    ss=0
    for i in range(0,len(mi)):
    ss = int(mi[i])(10*(len(mi)-i-1))
    final.append(ss)
    return(sum(final))


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.