摘要: from decimal import Decimal,getcontext getcontext().prec = 505 while True: try: a,b=map(Decimal,input().strip().split()) c='{:.500f}'.format(a**b).strip('0').rstrip('.')#否则计算出来的是科... 阅读全文
posted @ 2018-02-02 14:38 MapReduce 阅读(333) 评论(0) 推荐(0)
摘要: 1 from decimal import Decimal,getcontext 2 getcontext().prec=101#设置浮点数的精度为101位 3 a=Decimal(input()) 4 b=Decimal(input()) 5 print(str(a+b).rstrip('0'))#去掉右边多余的0 阅读全文
posted @ 2018-02-02 10:14 MapReduce 阅读(368) 评论(0) 推荐(0)