Greedy algorithm for Egyptian fractions: Difference between revisions

→‎{{header|Python}}: Show check on answers validity. (So the D implementation can be more confident) ;-
(+ D entry)
(→‎{{header|Python}}: Show check on answers validity. (So the D implementation can be more confident) ;-)
Line 173:
for fr in set(Fr(a, b) for a in range(1,100) for b in range(1, 100)):
e = ef(fr)
#assert sum((f[0] if type(f) is list else f) for f in e) == fr, 'Whoops!'
elen, edenom = len(e), e[-1].denominator
if elen > lenmax[0]:
Anonymous user