inver = input().split() inver = inver[::-1] def arithmetic(inver): if inver: alphabet = inver.pop() if alphabet == '+': return arithmetic(inver) + arithmetic(inver) elif alphabet == '-': return arithmetic(inver) - arithmetic(inver) elif alphabet == '*': return arithmetic(inver) * arithmetic(inver) elif alphabet == '/': return arithmetic(inver) / arithmetic(inver) return float(alphabet) else: pass print('%.6f'%arithmetic(inver))
0.0分
0 人评分