We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Security Encryption Scheme
Security Encryption Scheme
+ 0 comments (inventing the weel?)
Python:print(__import__('math').factorial(int(input())) )
+ 0 comments Non-recursive python solution...
n = int(input()) fact = 1 while n > 1: fact *= n n -= 1 print(fact)
+ 0 comments def factorial(x): if x == 1: return 1 else: return x * factorial(x-1) print(factorial(int(input())))
+ 0 comments #include<iostream> int factorial(int n){ if(n==1){return n;} return factorial(n-1)*n; } int main(){ int n; std::cin>>n; std::cout<<factorial(n); return 0; }
+ 0 comments What is factorial?
print([1,1,2,6,24,120,720,5040,40320,362880,3628800][int(input())])
Load more conversations
Sort 15 Discussions, By:
Please Login in order to post a comment