s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
int64
0
100
memory
stringlengths
4
6
code_size
int64
15
14.7k
code
stringlengths
15
14.7k
problem_id
stringlengths
6
6
problem_description
stringlengths
358
9.83k
input
stringlengths
2
4.87k
output
stringclasses
807 values
__index_level_0__
int64
1.1k
1.22M
s803797155
p00019
u779627195
1352883390
Python
Python
py
Accepted
10
18000
160
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)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,902
s717925216
p00019
u647766105
1354098894
Python
Python
py
Accepted
20
15000
51
from math import factorial print factorial(input())
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,903
s854321225
p00019
u280179677
1356070727
Python
Python
py
Accepted
10
4308
223
#!/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()
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,904
s717185070
p00019
u419407022
1356090268
Python
Python
py
Accepted
20
47000
70
print reduce(lambda x,y:x*y,map(lambda x:x+1,range(int(raw_input()))))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,905
s765200157
p00019
u310759044
1357093174
Python
Python
py
Accepted
10
4200
42
i=input() a=1 while i: a*=i;i-=1; print a
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,906
s241252420
p00019
u310759044
1357102225
Python
Python
py
Accepted
10
4200
42
i=input() a=1 while i: a*=i i-=1 print a
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,907
s128410043
p00019
u310759044
1357102279
Python
Python
py
Accepted
10
4196
42
i=input() a=1 while i: a*=i;i-=1; print a
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,908
s231000669
p00019
u782850731
1362101461
Python
Python
py
Accepted
20
4344
197
from __future__ import (absolute_import, division, print_function, unicode_literals) from sys import stdin from math import factorial print(factorial(int(stdin.readline())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,909
s621858906
p00019
u282635979
1363436633
Python
Python
py
Accepted
10
4196
70
n = input() answer = 1 while n != 1: answer *= n n -= 1 print answer
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,910
s686947393
p00019
u743065194
1363923509
Python
Python
py
Accepted
10
4204
144
''' 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)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,911
s422711271
p00019
u560838141
1364277450
Python
Python
py
Accepted
20
4196
70
n = input() ans = 1; for i in range(1, n + 1): ans *= i; print ans
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,912
s268574230
p00019
u256940798
1365699064
Python
Python
py
Accepted
10
4200
60
n=int(raw_input()) a=1 for i in range(1,n+1): a*=i print a
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,913
s085223339
p00019
u585414111
1366354825
Python
Python
py
Accepted
20
4204
57
def f(n): return n*f(n-1) if n!=0 else 1 print f(input())
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,914
s430872151
p00019
u542421762
1368196999
Python
Python
py
Accepted
10
4204
221
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)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,915
s291315631
p00019
u350508326
1368460303
Python
Python
py
Accepted
10
4204
152
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)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,916
s566627340
p00019
u260980560
1369924301
Python
Python
py
Accepted
20
4200
92
def fact(n): if n==1: return 1 return n*fact(n-1) n = input() print fact(n)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,917
s081025696
p00019
u912237403
1377911753
Python
Python
py
Accepted
10
4296
60
n=input() x = reduce(lambda a,b: a*b, range(1,n+1)) print x
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,918
s496652919
p00019
u813384600
1379501258
Python
Python
py
Accepted
10
4332
51
import math print math.factorial(int(raw_input()))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,919
s798270015
p00019
u523886269
1381369503
Python
Python
py
Accepted
10
4212
175
#!/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()
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,920
s561449584
p00019
u230836528
1392306935
Python
Python
py
Accepted
10
4196
266
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
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,921
s707386083
p00019
u633068244
1393380783
Python
Python
py
Accepted
10
4192
128
n = int(raw_input()) def fact(n): if n == 1 or n == 0: return 1 else: return n*fact(n-1) print fact(n)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,922
s696098976
p00019
u858885710
1393945944
Python
Python
py
Accepted
10
4188
70
res, n = 1,int(raw_input()) while n > 0: res, n = res*n, n-1 print res
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,923
s841938522
p00019
u912237403
1394221834
Python
Python
py
Accepted
10
4180
42
n=input() x=1 while n: x,n=x*n,n-1 print x
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,924
s660475806
p00019
u193025715
1395392389
Python
Python
py
Accepted
10
4312
50
import math print math.factorial(int(raw_input()))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,925
s069723063
p00019
u246033265
1396616053
Python
Python
py
Accepted
10
4184
76
def f(n): return 1 if n == 1 else f(n - 1) * n print f(int(raw_input()))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,926
s619740067
p00019
u633068244
1397321644
Python
Python
py
Accepted
20
4284
47
print reduce(lambda x,y:x*y,range(1,input()+1))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,927
s420848655
p00019
u708217907
1398472797
Python
Python
py
Accepted
10
4188
121
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))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,928
s321531386
p00019
u703196441
1399554922
Python
Python
py
Accepted
10
4316
41
import math print math.factorial(input())
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,929
s049179645
p00019
u703196441
1399555032
Python
Python
py
Accepted
20
4192
224
print [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000][input()]
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,930
s166970850
p00019
u491763171
1401138459
Python
Python
py
Accepted
10
4316
41
import math print math.factorial(input())
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,931
s555819824
p00019
u436634575
1401141879
Python
Python3
py
Accepted
30
6716
110
from functools import reduce from operator import mul n = int(input()) print(reduce(mul, range(1, n + 1), 1))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,932
s684489906
p00019
u146816547
1403172641
Python
Python
py
Accepted
10
4188
75
n = int(raw_input()) ans = 1 for i in xrange(1,n+1): ans *= i print ans
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,933
s947022784
p00019
u618672141
1403749305
Python
Python3
py
Accepted
30
6720
112
def fac(n): f = 1 for i in range(2, n + 1): f *= i return f n = int(input()) print(fac(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,934
s500130488
p00019
u954196415
1596985261
Python
Python3
py
Accepted
20
5652
55
from math import factorial as f print(f(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,935
s045417985
p00019
u525366883
1596112424
Python
Python3
py
Accepted
20
5580
75
n = int(input()) num = 1 for i in range(n): num = num*(i+1) print(num)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,936
s548417754
p00019
u187074069
1594857860
Python
Python3
py
Accepted
20
5580
82
num = int(input()) ans = num for i in range(1, num): ans = ans *i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,937
s870212802
p00019
u240091169
1594781806
Python
Python3
py
Accepted
20
5584
74
n = int(input()) ans = 1 for i in range(1, n+1) : ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,938
s892284116
p00019
u842461513
1588922416
Python
Python3
py
Accepted
20
5648
102
#mathモジュールを使い、階乗を計算する import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,939
s972389898
p00019
u490578380
1585499086
Python
Python3
py
Accepted
20
5576
79
n = int(input()) fac = 1 for i in range(1, n + 1): fac *= i print(fac)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,940
s975575594
p00019
u808372529
1583834505
Python
Python3
py
Accepted
20
5576
65
n = int(input()) s = 1 for i in range(1,n+1): s=s*i print(s)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,941
s911574947
p00019
u630911389
1581178037
Python
Python3
py
Accepted
20
5576
77
num = int(input()) ans = 1 for i in range(num,1,-1): ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,942
s853431118
p00019
u153447291
1579427854
Python
Python3
py
Accepted
20
5644
48
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,943
s703916354
p00019
u314166831
1575963599
Python
Python3
py
Accepted
20
5692
3,178
# 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)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,944
s984944330
p00019
u037441960
1570772466
Python
Python3
py
Accepted
20
5576
82
n = int(input()) ans = 1 for i in range(1, n + 1) : ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,945
s529325534
p00019
u803862921
1570545372
Python
Python3
py
Accepted
20
5580
67
n = int(input()) c = 1 for i in range(1,n+1): c *= i print(c)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,946
s670189130
p00019
u824708460
1566226434
Python
Python3
py
Accepted
20
5576
75
n = int(input()) sum = 1 for i in range(1, n + 1): sum *= i print(sum)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,947
s251062871
p00019
u074302614
1565047732
Python
Python3
py
Accepted
20
5576
77
a = int(input()) res = 1 for i in range(a, 1, -1): res *= i print(res)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,948
s150895564
p00019
u427219397
1564896097
Python
Python3
py
Accepted
20
5584
60
n=int(input()) A=1 for i in range(1,n+1): A*=i print(A)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,949
s118816613
p00019
u108130680
1564800610
Python
Python3
py
Accepted
20
5644
54
n=int(input()) import math print(math.factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,950
s758632174
p00019
u011621222
1564489626
Python
Python3
py
Accepted
20
5560
136
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))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,951
s678160924
p00019
u013648252
1563752873
Python
Python3
py
Accepted
20
5652
56
import math n = int(input()) print(math.factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,952
s668276330
p00019
u313600138
1562858140
Python
Python3
py
Accepted
20
5580
66
n=int(input()) ans=1 for i in range(1,n+1): ans *=i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,953
s392597800
p00019
u963397340
1561266433
Python
Python
py
Accepted
10
4628
74
n = int(input()) ans = 1 for i in range(2, n+1) : ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,954
s148719799
p00019
u548252256
1560177943
Python
Python3
py
Accepted
20
5648
86
import math if __name__ == '__main__': n = int(input()) print(math.factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,955
s402167359
p00019
u506537276
1560148279
Python
Python3
py
Accepted
20
5584
107
def fact(n): if n == 1: return 1 else: return n * fact(n - 1) n = int(input()) print(fact(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,956
s475553435
p00019
u804558166
1560146118
Python
Python3
py
Accepted
20
5644
48
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,957
s135359332
p00019
u625806423
1557110797
Python
Python3
py
Accepted
20
5588
118
def factorial(n): if n == 1: return 1 else: return n*factorial(n-1) n = int(input()) print(factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,958
s527745769
p00019
u647694976
1555491966
Python
Python3
py
Accepted
20
5580
70
N=int(input()) ans=1 for i in range(1,N+1): ans=ans*i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,959
s531776490
p00019
u406093358
1555486901
Python
Python
py
Accepted
10
4620
78
n = int(raw_input()) ans = 1 for i in range(1, n+1): ans = ans * i print ans
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,960
s128594025
p00019
u855694108
1554382514
Python
Python3
py
Accepted
20
5584
75
n = int(input()) ans = 1 for i in range(1, n + 1): ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,961
s687416470
p00019
u775669748
1554265294
Python
Python3
py
Accepted
20
5584
79
def fact(n): return 1 if n == 1 else n*fact(n-1) print(fact(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,962
s913997426
p00019
u350155409
1553219204
Python
Python3
py
Accepted
20
5576
67
n = int(input()) f = 1 for i in range(n): f = f*(i+1) print(f)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,963
s825782921
p00019
u565812827
1552713909
Python
Python3
py
Accepted
20
5648
48
import math;print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,964
s042859035
p00019
u431726425
1550671467
Python
Python3
py
Accepted
20
5588
95
n = int(input()) def f(n): if n == 0 : return 1 else : return f(n - 1) * n print(f(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,965
s037222082
p00019
u806257385
1548854245
Python
Python3
py
Accepted
20
5644
52
import math a=int(input()) print(math.factorial(a))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,966
s144706914
p00019
u689047545
1547188597
Python
Python3
py
Accepted
20
5648
54
import math n = int(input()) print(math.factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,967
s084379207
p00019
u537067968
1545022987
Python
Python3
py
Accepted
20
5648
127
# coding: utf-8 # coding: Shift_JIS # coding: EUC-JP # coding: cp932 import math n = int(input()) print(math.factorial(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,968
s769765451
p00019
u158979022
1544456245
Python
Python3
py
Accepted
20
5644
48
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,969
s033492210
p00019
u563075864
1542610937
Python
Python3
py
Accepted
20
5576
66
n = int(input()) k = 1 for j in range(1,n+1): k *= j print(k)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,970
s795092740
p00019
u067299340
1542173191
Python
Python3
py
Accepted
20
5644
48
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,971
s777978264
p00019
u623996423
1542010177
Python
Python
py
Accepted
10
4660
52
print reduce(lambda a, b: a*b, range(1, input()+1))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,972
s094294009
p00019
u717526540
1541651899
Python
Python3
py
Accepted
20
5580
77
n = int(input()) ans = 1 for i in range(1, n+1): ans *= i print(ans)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,973
s020570947
p00019
u098862429
1541305666
Python
Python3
py
Accepted
20
5584
114
n = int(input()) def fact(n): ans = 1 for n in range(n,1,-1): ans *= n return ans print(fact(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,974
s482873207
p00019
u219940997
1537452606
Python
Python3
py
Accepted
20
5648
49
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,975
s672511761
p00019
u536280367
1537016889
Python
Python3
py
Accepted
20
5584
145
# import math # print(math.factorial(int(input()))) def f(a): if a == 1: return a return a * f(a - 1) print(f(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,976
s420771289
p00019
u252700163
1534606990
Python
Python3
py
Accepted
30
6276
126
from functools import reduce n = int(input()) factional = reduce(lambda x,y:y*x, [i for i in range(1, n+1)]) print(factional)
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,977
s315364392
p00019
u319725914
1534226066
Python
Python3
py
Accepted
20
5592
211
print([0,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368000,20922789888000,355687428096000,6402373705728000,121645100408832000,2432902008176640000][int(input())])
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,978
s167993003
p00019
u995990363
1533786836
Python
Python3
py
Accepted
20
5652
114
import math def run(): n = int(input()) print(math.factorial(n)) if __name__ == '__main__': run()
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,979
s398457974
p00019
u539753516
1533385137
Python
Python3
py
Accepted
20
5644
48
import math print(math.factorial(int(input())))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,980
s902377336
p00019
u079141094
1467422748
Python
Python3
py
Accepted
20
7616
97
# Factorial def f(n): if n == 1: return 1 return f(n-1) * n n = int(input()) print(f(n))
p00019
<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> &le; 20. </p> <H2>Input</H2> <p> An integer <var>n</var> (1 &le; <var>n</var> &le; 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>
5
120
6,981
s565902397
p00020
u896746547
1532097760
Python
Python3
py
Accepted
20
5532
39
n = input().rstrip() print(n.upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,982
s009469424
p00020
u525366883
1535542683
Python
Python
py
Accepted
10
4604
29
print raw_input().swapcase()
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,983
s267749119
p00020
u158979022
1545281864
Python
Python3
py
Accepted
20
5536
23
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,984
s419809680
p00020
u990228206
1551338963
Python
Python3
py
Accepted
20
5548
89
w=str(input()) ans="" for c in w: if 96<ord(c)<123:c=c.upper() ans+=c print(ans)
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,985
s635915250
p00020
u888548672
1555895401
Python
Python3
py
Accepted
20
5540
23
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,986
s558599915
p00020
u579833671
1410766398
Python
Python
py
Accepted
10
4180
26
print(raw_input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,987
s118502846
p00020
u506132575
1416123209
Python
Python
py
Accepted
10
4180
109
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys for s in sys.stdin: d = s.upper() print d[:-1]
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,988
s226046385
p00020
u162387221
1417691932
Python
Python3
py
Accepted
30
6716
22
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,989
s093705905
p00020
u342537066
1420712426
Python
Python3
py
Accepted
30
6720
26
s=input() print(s.upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,990
s297425974
p00020
u567380442
1422621404
Python
Python3
py
Accepted
30
6724
22
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,991
s473842815
p00020
u879226672
1424352469
Python
Python
py
Accepted
10
4192
119
ls = raw_input().split(" ") for k in range(len(ls)): ls[k] = ls[k].upper() print " ".join(map(str,[k for k in ls]))
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,992
s507545703
p00020
u140201022
1425491768
Python
Python
py
Accepted
10
4176
25
print raw_input().upper()
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,993
s418257051
p00020
u744114948
1425905919
Python
Python3
py
Accepted
30
6724
163
s=input() for i in range(len(s)): s=list(s) if ord(s[i]) <= ord("z") and ord(s[i]) >= ord("a"): s[i] = chr(ord(s[i])-32) s="".join(s) print(s)
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,994
s441919939
p00020
u540744789
1425992955
Python
Python
py
Accepted
10
4188
203
def toupper(c): if c in 'abcdefghijklmnopqrstuvwxyz': return chr(ord(c)-32) else: return c upperstrings="" for c in raw_input(): upperstrings += toupper(c) print upperstrings
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,995
s014796468
p00020
u210684432
1428121505
Python
Python3
py
Accepted
30
6720
22
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,996
s970418806
p00020
u145563629
1428805605
Python
Python
py
Accepted
10
4184
25
print raw_input().upper()
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,997
s482099355
p00020
u067299340
1433248133
Python
Python
py
Accepted
20
4180
25
print raw_input().upper()
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,998
s192913296
p00020
u067299340
1433248138
Python
Python
py
Accepted
10
4180
25
print raw_input().upper()
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
6,999
s835993752
p00020
u873482706
1434524434
Python
Python
py
Accepted
10
4188
200
input_line = raw_input() answer = '' for char in input_line: if char == ' ': answer += ' ' elif char == '.': answer += '.' else: answer += char.upper() print answer
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
7,000
s357263762
p00020
u379956761
1434882306
Python
Python3
py
Accepted
30
6724
22
print(input().upper())
p00020
<H1>Capitalize</H1> <p> Write a program which replace all the lower-case letters of a given text with the corresponding captital letters. </p> <H2>Input</H2> <p> A text including lower-case letters, periods, and space is given in a line. The number of characters in the text is less than or equal to 200. </p> <H2>Output</H2> <p> Print the converted text. </p> <H2>Sample Input</H2> <pre> this is a pen. </pre> <H2>Output for the Sample Input</H2> <pre> THIS IS A PEN. </pre>
this is a pen.
THIS IS A PEN.
7,001