题解 | #四则运算#
四则运算
https://www.nowcoder.com/practice/9999764a61484d819056f807d2a91f1e
# 人生苦短,我用python
string = input().strip()
string = string.replace('{', '(').replace('[', '(').replace('}', ')').replace(']', ')')
print(int(eval(string)) if int(eval(string)) == eval(string) else eval(string))

查看13道真题和解析