Skip to content

Commit

Permalink
Update seqmult.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daedalus committed Feb 10, 2024
1 parent 90cc63b commit 34a6989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion seqmult.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def SeqMult(s):
mul = lambda a, b: a * b
l = len(s)
while l > 1:
if l % 2 != 0:
if l & 1 == 1:
s += [1]
l += 1
s = list(map(mul, s[: l // 2], s[l // 2 :]))
Expand Down

0 comments on commit 34a6989

Please sign in to comment.