zerojudge python 解題心得
import sys from functools import reduce import operator def fn(x): x = [int(c) for c in x.split('*')] return(reduce(operator.mul, x, 1)) s = sys.stdin.readline().strip().split('+') print(sum([fn(x) for x in s])%10000)
沒有留言:
張貼留言