submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s382233725 | p00019 | Accepted | def main():
n = int(input())
print(fact(n))
def fact(i):
if i == 0:
return 1
return i * fact(i - 1)
if __name__ == '__main__':
main() | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s520205022 | p00019 | Accepted | #import sys
#import math
ans= int(1)
for i in range(2,int(input())+1):
ans*=i
print(ans) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s234245597 | p00019 | Accepted | # -*- coding:utf-8 -*-
n = int(input())
m = 1
for i in range(1,n+1):
m = m*i
print(m) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s889001689 | p00019 | Accepted | from math import factorial as f
print(f(int(input()))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s708821133 | p00019 | Accepted | n = int(raw_input())
sum=1
for i in range(n):
sum *= (i+1)
print sum | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s343778096 | p00019 | Accepted | n = input()
self = 1
for i in range(1, n + 1):
self = self * i
print self | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s006837090 | p00019 | Accepted | array = [1]
for i in range(int(input())):
array.append(array[i] * (i+1))
print(array.pop()) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s589630694 | p00019 | Accepted | def factorial(x):
y = 1
for i in range(1, x + 1):
y *= i
return y
n = int(input())
print(factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s127706582 | p00019 | Accepted | s = int(input())
k = 1
for i in range(2,s+1):
k *= i
print(k) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s196293033 | p00019 | Accepted | import sys
import math as mas
n=int(input())
a=1
for i in range(n):a*=i+1
print(a)
#for i in sys.stdin:
# a,b=map(int,i.split())
# print(gcd(a,b),lcm(a,b)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s165736572 | p00019 | Accepted | from functools import reduce
from operator import mul
print(reduce(mul, range(1, int(input()) + 1), 1)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s441739385 | p00019 | Accepted | # -*- coding: utf-8 -*-
import sys
import os
def factorial(n):
if n == 1:
return 1
else:
return factorial(n-1) * n
n = int(input())
print(factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s788915397 | p00019 | Accepted | n = int(input())
result = n
for _ in range(n)[:1:-1] : result *= _
print(result) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s494971535 | p00019 | Accepted |
import math
num = int(input())
print(math.factorial(num)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s154666546 | p00019 | Accepted | import sys
from functools import reduce
n = int(sys.stdin.readline().rstrip())
print(reduce(lambda a,b:a*b,range(1,n+1))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s128531021 | p00019 | Accepted | from math import factorial
n = int(input())
print(factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s295202635 | p00019 | Accepted | from math import factorial
n = int(input())
print (factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s290576122 | p00019 | Accepted | def factorial(n):
if n==1:
return 1
else:
return n*factorial(n-1)
N=int(input())
print(factorial(N)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s346615126 | p00019 | Accepted | n = int(input())
ans = 1
while n > 1:
ans *= n
n -= 1
print(ans) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s737726447 | p00019 | Accepted | from functools import reduce as R
print(R(lambda x, y: x*y, range(1, int(input())+1))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s400593311 | p00019 | Accepted | import math
print(math.factorial(int(input()))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s424460276 | p00019 | Accepted | def fact(n):
if n == 0:
return 1
return n * fact(n - 1)
n = int(input())
print(fact(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s554798283 | p00019 | Accepted | import math
result = math.factorial(int(input()))
print(result) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s096654457 | p00019 | Accepted | def fact(n):
if n == 0:
return 1
return n * fact(n - 1)
n = int(input())
print(fact(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s658925235 | p00019 | Accepted | user = input()
n = int(user)
kai = 1
for i in range(1, n+1):
kai *= i
print(kai) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s402924161 | p00019 | Accepted | def main():
n = int(input())
for x in range(1, n):
n *= x
print(n)
if __name__ == "__main__":
main() | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s349059992 | p00019 | Accepted | # Aizu Problem 0019: Factorial
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
print(math.factorial(int(input()))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s403481602 | p00019 | Accepted | n = int(input())
factorial = 1
for i in range(2, n + 1):
factorial *= i
print(factorial) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s345240809 | p00019 | Accepted | def factorial(n):
if n == 1:
return 1
else:
return n * factorial(n-1)
n=input()
print(factorial(int(n))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s283462808 | p00019 | Accepted | from math import factorial
if __name__ == '__main__':
n = (int)(input())
print(factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s085143335 | p00019 | Accepted | # coding=utf-8
if __name__ == '__main__':
factorial = 1
n = int(input())
for i in range(1, n+1):
factorial *= i
print(factorial) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s876304530 | p00019 | Accepted | import math
x=int(input())
print(math.factorial(x)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s220417744 | p00019 | Accepted | # -*- coding:utf-8 -*-
a=1
b=input()
for i in range(1,b+1):
a*=i
print a, | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s105750329 | p00019 | Accepted | def factorial(n):
if n == 1:
return 1
return n * factorial(n - 1)
n = int(input())
print(factorial(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s516564217 | p00019 | Accepted | def fact(n):
if n == 0 or n == 1:
return 1
else:
return n * fact(n - 1)
print(fact(int(input()))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s584090159 | p00019 | Accepted | def Factorial(N):
if N == 0 :
return 1
else :
return Factorial(N-1)*N
def main():
n = int(input())
print(Factorial(n))
if __name__ == '__main__':
main()
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s683669893 | p00019 | Accepted | import math
def main():
n = int(input())
print(math.factorial(n))
if __name__ == '__main__':
main()
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s609144176 | p00019 | Accepted | import math
n = int(input())
print(math.factorial(n))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s242293682 | p00019 | Accepted | import math
print(math.factorial(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s357046620 | p00019 | Accepted | n = int(raw_input())
sum= 1
for num in range(1,n+1):
sum = sum * num
print sum
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s880104056 | p00019 | Accepted | import math
x=int(input())
x=math.factorial(x)
print(x)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s861569342 | p00019 | Accepted | def f(x):
if x == 1:
return x
else:
return x*f(x-1)
n = int(input())
print(f(n))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s489373325 | p00019 | Accepted | a=1
for i in range(2,int(input())+1):a*=i
print(a)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s579685468 | p00019 | Accepted | def f(n):
if n==1:return 1
return f(n-1)*n
print(f(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s260375252 | p00019 | Accepted | n = int(input())
key = 1
while n:
key *= n
n -= 1
print(key)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s767991501 | p00019 | Accepted | kazu=int(input());
ans=kazu
for h in range(kazu-1):
ans=ans*(h+1)
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s416383870 | p00019 | Accepted | def fact(n):
if n == 0:
return 1
else:
return n * fact(n - 1)
print(fact(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s068720206 | p00019 | Accepted | def kj(n):
if n==0 or n==1:return 1
return n*kj(n-1)
print(kj(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s181841252 | p00019 | Accepted | # AOJ 0019 Factorial
# Python3 2018.6.14 bal4u
import math
print(math.factorial(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s189350796 | p00019 | Accepted | n = input()
a = 1
for i in range(1,n+1):
a *= i
print a | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s426912323 | p00019 | Accepted | a = int(input())
b = 1
for i in range(1,a):
b*= i
print b*a | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s740949776 | p00019 | Accepted | a=int(input()) ; b=1
for i in range(1,a+1): b*=i
print b | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s710157770 | p00019 | Accepted | def factorial(n):
if n<=0:
return 1
else:
return n*factorial(n-1)
print factorial(int(raw_input())) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s213533702 | p00019 | Accepted | a = input()
ans = 1
for x in range(2,a+1):
ans = ans*x
print ans | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s803797155 | p00019 | Accepted | def f(s, n):
s *= n
if n <= 2:
return s
else:
return f(s, n-1)
n = int(raw_input())
s = 1
print f(s, n) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s717925216 | p00019 | Accepted | from math import factorial
print factorial(input()) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s854321225 | p00019 | Accepted | #!/usr/bin/python
def datasets():
s = raw_input().strip()
yield int(s)
def main():
for n in datasets():
print reduce(lambda a, b: a*b, range(1, n+1))
if __name__ == '__main__':
main() | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s717185070 | p00019 | Accepted | print reduce(lambda x,y:x*y,map(lambda x:x+1,range(int(raw_input())))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s765200157 | p00019 | Accepted | i=input()
a=1
while i:
a*=i;i-=1;
print a | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s241252420 | p00019 | Accepted | i=input()
a=1
while i:
a*=i
i-=1
print a | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s231000669 | p00019 | Accepted | from __future__ import (absolute_import, division, print_function,
unicode_literals)
from sys import stdin
from math import factorial
print(factorial(int(stdin.readline()))) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s621858906 | p00019 | Accepted | n = input()
answer = 1
while n != 1:
answer *= n
n -= 1
print answer | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s686947393 | p00019 | Accepted | '''
Created on Mar 22, 2013
@author: wukc
'''
from sys import stdin
n=int(stdin.readline())
ans=1
for i in range(1,n+1):
ans*=i
print(ans) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s422711271 | p00019 | Accepted | n = input()
ans = 1;
for i in range(1, n + 1):
ans *= i;
print ans | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s268574230 | p00019 | Accepted | n=int(raw_input())
a=1
for i in range(1,n+1):
a*=i
print a | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s085223339 | p00019 | Accepted | def f(n): return n*f(n-1) if n!=0 else 1
print f(input()) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s430872151 | p00019 | Accepted |
import sys
def fact(n):
if n == 1:
return 1
else:
return n * fact(n-1)
#input_file = open(sys.argv[1], "r")
#for line in input_file:
for line in sys.stdin:
n = int(line)
print fact(n) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s291315631 | p00019 | Accepted | def cal(x):
sum = 1
for i in range(x):
sum *= i+1
return sum
if __name__ == "__main__":
a = int(raw_input())
print cal(a) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s566627340 | p00019 | Accepted | def fact(n):
if n==1:
return 1
return n*fact(n-1)
n = input()
print fact(n) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s081025696 | p00019 | Accepted | n=input()
x = reduce(lambda a,b: a*b, range(1,n+1))
print x | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s496652919 | p00019 | Accepted | import math
print math.factorial(int(raw_input())) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s798270015 | p00019 | Accepted | #!/usr/bin/python
def main():
input = raw_input()
n = int(input)
print int(factorial(n))
def factorial(n):
if (n <= 1):
return 1
return n * factorial(n - 1)
main() | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s561449584 | p00019 | Accepted |
import sys
lineNumber = 0
#for line in ["3", "6", "9", "7", "5"]:
for line in sys.stdin.readlines():
lineNumber += 1
# get data
List = map(int, line.strip().split(" "))
n = List[0]
ans = 1
for i in xrange(2, n+1): ans *= i
print ans | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s707386083 | p00019 | Accepted | n = int(raw_input())
def fact(n):
if n == 1 or n == 0:
return 1
else:
return n*fact(n-1)
print fact(n) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s696098976 | p00019 | Accepted | res, n = 1,int(raw_input())
while n > 0: res, n = res*n, n-1
print res | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s841938522 | p00019 | Accepted | n=input()
x=1
while n: x,n=x*n,n-1
print x | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s069723063 | p00019 | Accepted | def f(n):
return 1 if n == 1 else f(n - 1) * n
print f(int(raw_input())) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s619740067 | p00019 | Accepted | print reduce(lambda x,y:x*y,range(1,input()+1)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s420848655 | p00019 | Accepted | import sys
def kai(n):
if(n <= 1):
return 1
else:
return n*kai(n-1)
for n in sys.stdin:
print kai(int(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s049179645 | p00019 | Accepted | print [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000][input()] | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s555819824 | p00019 | Accepted | from functools import reduce
from operator import mul
n = int(input())
print(reduce(mul, range(1, n + 1), 1)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s684489906 | p00019 | Accepted | n = int(raw_input())
ans = 1
for i in xrange(1,n+1):
ans *= i
print ans | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s947022784 | p00019 | Accepted | def fac(n):
f = 1
for i in range(2, n + 1):
f *= i
return f
n = int(input())
print(fac(n)) | 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s500130488 | p00019 | Accepted | from math import factorial as f
print(f(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s045417985 | p00019 | Accepted | n = int(input())
num = 1
for i in range(n):
num = num*(i+1)
print(num)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s548417754 | p00019 | Accepted | num = int(input())
ans = num
for i in range(1, num):
ans = ans *i
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s870212802 | p00019 | Accepted | n = int(input())
ans = 1
for i in range(1, n+1) :
ans *= i
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s892284116 | p00019 | Accepted | #mathモジュールを使い、階乗を計算する
import math
print(math.factorial(int(input())))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s972389898 | p00019 | Accepted | n = int(input())
fac = 1
for i in range(1, n + 1):
fac *= i
print(fac)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s975575594 | p00019 | Accepted | n = int(input())
s = 1
for i in range(1,n+1):
s=s*i
print(s)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s911574947 | p00019 | Accepted | num = int(input())
ans = 1
for i in range(num,1,-1):
ans *= i
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s703916354 | p00019 | Accepted | # coding=utf-8
###
### for python program
###
import sys
import math
# math class
class mymath:
### pi
pi = 3.14159265358979323846264338
### Prime Number
def pnum_eratosthenes(self, n):
ptable = [0 for i in range(n+1)]
plist = []
for i in range(2, n+1):
if ptable[i]==0:
plist.append(i)
for j in range(i+i, n+1, i):
ptable[j] = 1
return plist
def pnum_check(self, n):
if (n==1):
return False
elif (n==2):
return True
else:
for x in range(2,n):
if(n % x==0):
return False
return True
### GCD
def gcd(self, a, b):
if b == 0:
return a
return self.gcd(b, a%b)
### LCM
def lcm(self, a, b):
return (a*b)//self.gcd(a,b)
### Mat Multiplication
def mul(self, A, B):
ans = []
for a in A:
c = 0
for j, row in enumerate(a):
c += row*B[j]
ans.append(c)
return ans
### intチェック
def is_integer(self, n):
try:
float(n)
except ValueError:
return False
else:
return float(n).is_integer()
### 幾何学問題用
def dist(self, A, B):
d = 0
for i in range(len(A)):
d += (A[i]-B[i])**2
d = d**(1/2)
return d
### 絶対値
def abs(self, n):
if n >= 0:
return n
else:
return -n
mymath = mymath()
### output class
class output:
### list
def list(self, l):
l = list(l)
#print(" ", end="")
for i, num in enumerate(l):
print(num, end="")
if i != len(l)-1:
print(" ", end="")
print()
output = output()
### input sample
#i = input()
#N = int(input())
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]
#R = float(input())
#A.append(list(map(int,input().split())))
#for line in sys.stdin.readlines():
# x, y = [int(temp) for temp in line.split()]
#abc list
#abc = [chr(ord('a') + i) for i in range(26)]
### output sample
# print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
# print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
# print(" {}".format(i), end="")
def printA(A):
N = len(A)
for i, n in enumerate(A):
print(n, end='')
if i != N-1:
print(' ', end='')
print()
# リスト内包表記 ifあり
# [x-k if x != 0 else x for x in C]
# ソート(代入する必要なし)
# N.sort()
# 10000個の素数リスト
# P = mymath.pnum_eratosthenes(105000)
def get_input():
N = []
while True:
try:
#N.append(input())
#N.append(int(input()))
#N.append(float(input()))
N.append([int(x) for x in input().split()])
except EOFError:
break
return N
#D = get_input()
n = int(input())
ans = 1
for i in range(1,n+1):
ans *= i
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s984944330 | p00019 | Accepted | n = int(input())
ans = 1
for i in range(1, n + 1) :
ans *= i
print(ans)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s529325534 | p00019 | Accepted | n = int(input())
c = 1
for i in range(1,n+1):
c *= i
print(c)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s670189130 | p00019 | Accepted | n = int(input())
sum = 1
for i in range(1, n + 1):
sum *= i
print(sum)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s251062871 | p00019 | Accepted | a = int(input())
res = 1
for i in range(a, 1, -1):
res *= i
print(res)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s150895564 | p00019 | Accepted | n=int(input())
A=1
for i in range(1,n+1):
A*=i
print(A)
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s118816613 | p00019 | Accepted | n=int(input())
import math
print(math.factorial(n))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s758632174 | p00019 | Accepted | def fac(n):
ans=1
for i in range(n+1):
if i is not 0:
ans*=i
return ans
n = eval(input())
print(fac(n))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
s678160924 | p00019 | Accepted | import math
n = int(input())
print(math.factorial(n))
| 5
| 120
|
<H1>Factorial</H1>
<p>
Write a program which reads an integer <var>n</var> and prints the factorial of <var>n</var>. You can assume that <var>n</var> ≤ 20.
</p>
<H2>Input</H2>
<p>
An integer <var>n</var> (1 ≤ <var>n</var> ≤ 20) in a line.
</p>
<H2>Output</H2>
<p>
Print the factorial of <var>n</var> in a line.
</p>
<H2>Sample Input</H2>
<pre>
5
</pre>
<H2>Output for the Sample Input</H2>
<pre>
120
</pre>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.