Skip to content

Commit 4011a56

Browse files
authored
Update main.py
1 parent a7459a3 commit 4011a56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

day10/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@
88
print((1+(k == 1).sum()) * (1+(k == 3).sum()))
99

1010
cands = [e for i, e in run_length.encode(np.diff([0]+numbers)) if i == 1 and e > 1]
11+
# Tribonacci numbers - http://oeis.org/wiki/Tribonacci_numbers
12+
# 0, 0, 1, 1, 2, 4, 7, 13, 24, 44, ...
1113
combinations = {2: 2, 3: 4, 4: 7}
1214
print(np.prod([combinations[e] for e in cands]))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy