Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from decimal import *
- def remove_exponent(d):
- return d.quantize(Decimal(1)) if d == d.to_integral() else d.normalize()
- getcontext().prec = 20
- inp = input()
- a = inp.split(' ')
- array_ = []
- sum_ = Decimal('0')
- c = int(0)
- len_ = -9999
- for i in a:
- ar_ = a[c].split('.')
- len__ = len(str(ar_[1]))
- len_ = len__ if (len_<len__) else len_
- c = c+1
- c = int(0)
- for i in a:
- sum_ += Decimal(str(a[c]))
- c=c+1
- print('{0:f}'.format(sum_))
Advertisement
Add Comment
Please, Sign In to add comment