2021-10-04 22:01
芜湖市育红小学 测试开发 牛客260386943号:s = input() s = s.replace("{", "(") s = s.replace("}", ")") s = s.replace("[", "(") s = s.replace("]", ")") res = str(eval(s)) if "." not in res: print(int(eval(s))) else: sm_ = res.split(".")[1] if sm_=="0" and len(sm_)==1: print(int(eval(s))) else: print(float(eval(s)))
0 点赞 评论 收藏
分享
关注他的用户也关注了: