2013-04-17 14:34:39 +08:00

27 lines
541 B
Python

def C(x, y):
if x * 2 > y:
return C(y - x, y)
out = 1
for i in xrange(y, y - x, -1):
out *= i
for i in xrange(1, x + 1):
out /= i
return out
total = []
for i in xrange(1, 101):
j = 0
tmp = 0
for j in xrange(i + 1):
tmp = C(j, i)
if tmp < 1000000:
total.append((j, i, tmp))
else:
break
if 2 * j < i:
for j in xrange(j - 1, -1, -1):
total.append((i - j, i))
print 103 * 50 - len(total)