mirror of
https://github.com/jlengrand/project_euler.git
synced 2026-03-10 08:41:20 +00:00
to be very ugly. I'm sure I can find something better than that ! Still have to perform some good work on prime numbers! (one day . . . ) I begin to lack some primes problems cause of that :s Signed-off-by: Julien Lengrand-Lambert <julien@lengrand.fr>
29 lines
696 B
Python
29 lines
696 B
Python
#!/usr/bin/env python
|
|
'''
|
|
Created on 10 feb. 2012
|
|
|
|
@author: Julien Lengrand-Lambert
|
|
|
|
DESCRIPTION: Solves problem 53 of Project Euler
|
|
There are exactly ten ways of selecting three from five, 12345:
|
|
|
|
123, 124, 125, 134, 135, 145, 234, 235, 245, and 345
|
|
|
|
In combinatorics, we use the notation, 5C3 = 10.
|
|
|
|
In general,
|
|
|
|
nCr = n! / r!(nr)! ,where r n, n! = n(n1)...321, and 0! = 1.
|
|
It is not until n = 23, that a value exceeds one-million: 23C10 = 1144066.
|
|
|
|
How many, not necessarily distinct, values of nCr, for 1 n 100, are greater than one-million?
|
|
'''
|
|
def aaa():
|
|
"""
|
|
Returns
|
|
"""
|
|
return 1
|
|
|
|
if __name__ == '__main__':
|
|
print "Answer : %d " % (1)
|