Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 30
Image: ubuntu2004
Kernel: Python 3 (system-wide)
def comp_chips(n): L = [0,1,2,3,4,1,2,3,1] if n > 8: i = 9 while i <= n: L.append(min(L[i-1],L[i-5],L[i-8])+1) i += 1 print(L) return L[n]
comp_chips(15)
[0, 1, 2, 3, 4, 1, 2, 3, 1, 2, 2, 3, 4, 2, 3, 3]
3

This would mean that you need at least 3 packages for 15 computer chips.