标签:style class blog c code java
import re ex=raw_input() num="1234567890" a=re.findall("\d+",ex) b=re.findall("[+-]",ex) l=[] if len(a)==len(b): for i in range(len(a)): l.append(int(b[i]+a[i])) else:#a=b+1 l.append(int(a[0])) for i in range(1,len(a)): l.append(int(b[i-1]+a[i])) print sum(l)
标签:style class blog c code java
原文地址:http://www.cnblogs.com/xzenith/p/3749686.html