L=s.split('.') def f(n): i={'1':1,'2':2,'3':3,'4':4,'5':5,'6':6} return i[n] def k(x,y): return x*10+y def j(a): while a>=1: a=a/10 return a return reduce(k,map(f,L[0]))+j(reduce(k,map(f,L[1])))
Sign in to make a reply
梦想当个坏人