from decimal import * from math import sqrt getcontext().prec = 105 reduce(int.__add__, map(lambda a: \ reduce(lambda x,y: int(x)+int(y), str(a.sqrt()).replace('.', '')[:100], 0), map(lambda n: Decimal(str(n)), map(lambda k: \ 0 if int(sqrt(k)) ** 2 == k else k, range(100)) ) ), 0)
Surely it's cheating ;)
Aucun commentaire:
Enregistrer un commentaire