Skip to content

Instantly share code, notes, and snippets.

@catupper
Created January 8, 2012 20:43
Show Gist options
  • Select an option

  • Save catupper/1579623 to your computer and use it in GitHub Desktop.

Select an option

Save catupper/1579623 to your computer and use it in GitHub Desktop.
from __future__ import division
def zenka(a):
p=6
res=0
list=[0]*(a-1)
list[0]=6
for x in range(10000):
res+=(x+2)*list[-1]/(p*6)
p*=6
list=[sum(list)*5]+list[:-1]
print res
print zenka(2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment