예제 #1
0
#!/usr/bin/env python
# http://projecteuler.net/index.php?section=problems&id=12
import math
from EulerLibs import MathLibs

print MathLibs.factorial(500)

factors = 0
cursor = 0
while (factors <= 500):
	cursor += 1
	answer = MathLibs.triangleNumber(cursor)
	factors = len(MathLibs.factors(answer))
	
print answer
예제 #2
0
#!/usr/bin/env python
# http://projecteuler.net/index.php?section=problems&id=20
import math
from EulerLibs import MathLibs,StrLibs

f100 = str(MathLibs.factorial(100))
answer = StrLibs.sumDigits(f100)
print answer