Attachment 'Sav_1_cercled_h(~500).py'
Download 1 def chf(n):
2 lst = (1, )
3 c = 1
4 for i in xrange(1, n+1):
5 c *= i
6 lst += (c, )
7 return lst
8
9
10 n = input()
11 k = input()
12 flst = chf(n-2)
13 l = 0
14
15 for i in xrange(k):
16 for j in xrange(n-k):
17 l += flst[i+j]*flst[k-1]*flst[n-k-1]/(flst[i]*flst[j]*flst[i]*flst[k-1-i]*flst[j]*flst[n-k-1-j])
18 print l
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2011-09-26 08:35:16, 0.3 KB) [[attachment:Sav_1_cercled_h(~500).py]]
- [get | view] (2011-09-26 08:35:16, 0.5 KB) [[attachment:Sav_2_graphfn(simple, different functions).py]]
- [get | view] (2011-09-26 08:35:16, 0.6 KB) [[attachment:circledot_factorials.py]]
- [get | view] (2011-09-26 08:35:16, 22.8 KB) [[attachment:lines-antialias.png]]
- [get | view] (2011-09-26 08:35:16, 4.3 KB) [[attachment:lines-antialias.py]]
- [get | view] (2011-09-26 08:35:16, 2.0 KB) [[attachment:lines-antialias.seg]]
- [get | view] (2011-09-26 08:35:16, 44.0 KB) [[attachment:lines-antialias2.png]]
- [get | view] (2011-09-26 08:35:16, 2.6 KB) [[attachment:lines-antialias2.seg]]
- [get | view] (2011-09-26 08:35:16, 15.1 KB) [[attachment:lines8.png]]
- [get | view] (2011-09-26 08:35:16, 1.9 KB) [[attachment:lines8.seg]]
You are not allowed to attach a file to this page.