AJ's Code blog
spoj solutions and other codes in python, C , C++
Monday, 21 January 2013
Factorial
11. Factorial Problem code: FCTRL
def f(n):
if n == 0:
return 1
else:
return n * f(n-1)
i=input
for t in range(i()):
print "%d" % f(i())
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment