def Func(n,r): a=JieCheng(n)/JieCheng(r)/JieCheng(n-r) return a def JieCheng(n): sum=1 for i in range(1,n+1): sum=sum*i return sum num=0 for i in range(1,101): for j in range(1,101): s=Func(i,j) if s>1000000: num+=1 print num