02 2018 档案
摘要: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('.')#否则计算出来的是科...
阅读全文
摘要: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
阅读全文
摘要:1 import math 2 a = int(input()) 3 b = 2**a-1 4 print(int(math.log10(2) * a) + 1)//近似计算,幸好数据点都过了 5 a = b % (10**500) 6 l = [] 7 for i in range(500): 8 l.append(a % 10) 9 a =a // 10 1...
阅读全文

浙公网安备 33010602011771号