Skip to content

Instantly share code, notes, and snippets.

@kaathewise
Last active December 21, 2021 12:47
Show Gist options
  • Save kaathewise/31212d74157645f9a9d7e6b584334e2f to your computer and use it in GitHub Desktop.
Save kaathewise/31212d74157645f9a9d7e6b584334e2f to your computer and use it in GitHub Desktop.
print([(lambda f:f(f,0,3,4,0,0))(lambda f,i,p,q,s,t: (i,p,q,s,t) not in m and m.update({(i,p,q,s,t): sum(f(f,1-i,q,(p+d+2)%10+1,t,s+(p+d+2)%10+1)*[1,3,6,7,6,3,1][d] for d in range(7)) if t<21 else i}) or m[i,p,q,s,t]) for m in [{}]][0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment