submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s673383297
p00018
WA: Presentation Error
s=list(map(int, input().split())) s.sort() s.reverse() for i in s: print(str(i)+" ", end="") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s459651776
p00018
WA: Presentation Error
s=list(map(int, input().split())) s.sort() s.reverse() for i in s: print(i, end="") if i != s[4]: print(" ", end="") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s946726195
p00018
WA: Presentation Error
a=input().split(" ") a.sort() for i in a[::-1]: print(i,end='')
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s855252549
p00018
WA: Presentation Error
a=input().split(" ") a.sort() for i in a[::-1]: print(str(i),end="")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s383784109
p00018
WA: Presentation Error
a=input().split(" ") a.sort() for i in a[::-1]: print(str(i),end=" ")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s149081173
p00018
WA: Presentation Error
def sort(num): l = len(num) for i in range(0,l): for j in range(0,l-i-1): if num[j] < num[j+1]: temp = num[j] num[j] = num[j+1] num[j+1]=temp for i in range(len(num)): print(num[i],end=' ') a , b , c , d , e = map(int,input().split()) num = [] num.append(a) num.append(b) num.append(c) num.append(d) num.append(e) sort(num)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s292377299
p00018
WA: Presentation Error
def sort(num): l = len(num) for i in range(0,l): for j in range(0,l-i-1): if num[j] < num[j+1]: temp = num[j] num[j] = num[j+1] num[j+1]=temp print(num[0],end='') for i in range(1,len(num)): print('',num[i],end='') a , b , c , d , e = map(int,input().split()) num = [] num.append(a) num.append(b) num.append(c) num.append(d) num.append(e) sort(num)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s390358083
p00018
WA: Presentation Error
import sys line = sys.stdin.readline() line = line.split(" ") inp = [] for i in line: inp.append(int(i)) inp.sort() inp.reverse() for i in inp: if inp.index(i)<len(inp)-1: print (i, end=" ") else: print (i)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s613074971
p00018
WA: Presentation Error
numlist = [eval(item) for item in input().split()] numlist.sort() numlist.reverse() for item in numlist: print(item, end = ' ') print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s372053211
p00018
WA: Presentation Error
numlist = [eval(item) for item in input().split()] numlist.sort() numlist.reverse() for item in numlist: print(item, end = ' ')
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s434044583
p00018
WA: Presentation Error
Num = list(map(int,input().split())) Num.sort() Num = Num[::-1] for i in range(len(Num)): print(Num[i],end = ' ')
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s178923018
p00018
WA: Presentation Error
Num = list(map(int,input().split())) Num.sort() Num = Num[::-1] for i in range(len(Num)): print(Num[i],end = ' ') print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s725620133
p00018
WA: Presentation Error
# -*- coding:utf-8 -*- data = input() n = [0]*5 n[0],n[1],n[2],n[3],n[4] = map(int,data.split(' ')) count = 0 while True: for i in range(len(n)-1): if n[i] < n[i+1]: tmp = n[i] n[i] = n[i+1] n[i+1] = tmp count += 1 if count == 5: break for i in range(len(n)): print(n[i],end=' ') print('')
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s274812668
p00018
WA: Presentation Error
for x in sorted(list(map(int, input().split())), reverse=True): print(x, end=" ")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s402097558
p00018
WA: Presentation Error
user = input() a = [] b = [] b = user.split() for i in range(5): a.append(int(b[i])) for j in range(4): for k in range(j+1, 5): # j<k if a[j] < a[k]: tmp = a[j] a[j] = a[k] a[k] = tmp for j in range(5): print(str(a[j]), end=" ") print("")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s555121031
p00018
WA: Presentation Error
def main(): a = list(map(int, input().split())) a.sort(reverse = True) for x in a: print(x, end = " ") print() if __name__ == "__main__": main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s057274573
p00018
WA: Presentation Error
line = [int(i) for i in input().split()] line.sort(reverse=True) for l in line: print(l, end=" ")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s271867585
p00018
WA: Presentation Error
line = [int(i) for i in input().split()] line.sort(reverse=True) for l in line: print(l, end=" ") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s643957839
p00018
WA: Presentation Error
# AOJ 0018 Sorting Five Numbers # Python3 2018.6.11 bal4u a = list(map(int, input().split())) a.sort(reverse=True) for i in a: print(i, end = " ") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s171663390
p00018
WA: Presentation Error
x = map(int,raw_input().split(' ')) x.sort() x.reverse() output = '' for val in x: output += str(val) + ' ' output.strip() print output
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s704129994
p00018
WA: Presentation Error
for i in sorted(map(int, raw_input().split()))[::-1]: print i, print ''
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s458014485
p00019
Wrong Answer
tmp = 1 n = int(raw_input()) for i in range(1, n+1): n*=i print 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> &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>
s955790759
p00019
Wrong Answer
tmp = 1 n = int(raw_input()) for i in range(1, n+1): n*=i print i
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> &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>
s596875020
p00019
Wrong Answer
ret = 1 for i in range(2, int(input())): ret *= i print(ret)
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> &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>
s150230032
p00019
Wrong Answer
factorial= 1 number= int(input("Enter a number:")) for r in range (1,number+1): factorial*=r 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> &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>
s327340002
p00019
Wrong Answer
(lambda n:__import__("functools").reduce(lambda a,b:a*b,range(1,n+1)))(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> &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>
s882737180
p00019
Wrong Answer
n = input() self = 1 for i in range(1, n + 1): self = self * i print 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> &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>
s069424416
p00019
Wrong Answer
from math import factorial n = int(input()) print(factorial(5))
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> &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>
s697508350
p00019
Wrong Answer
# coding=utf-8 import math if __name__ == '__main__': # n = int(input()) print('120')
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> &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>
s179096233
p00019
Wrong Answer
a=1 for i in range(1,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> &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>
s925243838
p00019
Wrong Answer
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): 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> &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>
s982511542
p00019
Wrong Answer
print reduce(lambda x,y:x*y,range(1,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> &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>
s287890508
p00019
Wrong Answer
n = int(raw_input()) ans = 1 for i in xrange(1,n): 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> &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>
s502434117
p00019
Time Limit Exceeded
import math print math.factorial(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> &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>
s167442920
p00019
Accepted
n = int(input()) base = 1 for i in range(n): base *= i + 1 print(base)
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> &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>
s078584869
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> &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>
s399552637
p00019
Accepted
tmp = 1 n = int(raw_input()) for i in range(1, n+1): tmp*=i print tmp
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> &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>
s477339806
p00019
Accepted
n=int(input()) F=1 for i in range(1,n+1): F*=i print(F)
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> &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>
s759578720
p00019
Accepted
def Factorial(n): if n <= 1: return 1 return n*Factorial(n-1) print(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> &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>
s244354214
p00019
Accepted
n = input() ans = 1 for i in xrange(0,n): ans *= i+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> &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>
s376682216
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> &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>
s649367166
p00019
Accepted
def fac(x): if x<=1: return 1 return fac(x-1)*x while True: try: n=input() print fac(n) except EOFError: break
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> &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>
s122180407
p00019
Accepted
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import math for s in sys.stdin: d = int(s) print math.factorial(d)
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> &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>
s386044364
p00019
Accepted
def fact(n): if(n==0): return 1 return n * fact(n-1) if __name__ == '__main__': 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> &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>
s348783967
p00019
Accepted
print(["1","1","2","6","24","120","720","5040","40320","362880","3628800","39916800","479001600","6227020800","87178291200","1307674368000","20922789888000","355687428096000","6402373705728000","121645100408832000","2432902008176640000","51090942171709440000"][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> &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>
s986068626
p00019
Accepted
def f(x): return 1 if x<2 else x*f(x-1) 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> &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>
s267889806
p00019
Accepted
def func(num): if num<=1: return 1 return num*func(num-1) n=int(input()) print(func(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> &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>
s096997609
p00019
Accepted
__author__ = 'hayato.osanai' import sys import math for line in sys.stdin: n = int(line) print(math.factorial(n)) break
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> &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>
s287758963
p00019
Accepted
ret = 1 for i in range(2, int(input()) + 1): ret *= i print(ret)
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> &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>
s754545490
p00019
Accepted
def factorial(n): if n==1: return 1 else: return n * factorial(n-1) n = int(raw_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> &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>
s387743086
p00019
Accepted
fact=1 for i in range(2,input()+1): fact*=i print fact
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> &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>
s000940003
p00019
Accepted
s=int(input()) ans=1 for i in range(1,s+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> &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>
s134380169
p00019
Accepted
from math import factorial 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> &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>
s450545663
p00019
Accepted
# -*- coding:shift-jis -*- x=input() def f(n): if n==0:return 1 return f(n-1)*n print(f(int(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> &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>
s952703253
p00019
Accepted
def fact(a): if a == 0: return 1 return fact(a-1) * a print fact(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> &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>
s712488644
p00019
Accepted
res = 1 for i in range(int(raw_input())): res *= i+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> &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>
s412268711
p00019
Accepted
import math print math.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> &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>
s394248481
p00019
Accepted
n = int(raw_input()) answer = 1 for i in range(n): answer *= i+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> &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>
s329938569
p00019
Accepted
from functools import reduce print(reduce(lambda x, y: x*y, [x for x in 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> &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>
s237924047
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> &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>
s763402726
p00019
Accepted
n = input() ans = 1 for x in range(n): ans *= x + 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> &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>
s122263944
p00019
Accepted
def f(n): return f(n - 1) * n if n > 0 else 1 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> &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>
s494470912
p00019
Accepted
ans=1 for i in range(1,int(raw_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> &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>
s149192631
p00019
Accepted
# -*- coding:utf-8 -*- def main(): n=int(input()) count=n a=1 while count!=1: a*=count count-=1 print(a) 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> &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>
s725702486
p00019
Accepted
import sys import math n = (int)(input()) res = 1 for i in range(1,n+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> &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>
s296006633
p00019
Accepted
def f(x): if x == 0: return 1 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> &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>
s230799061
p00019
Accepted
from math import * PI = 3.1415926535898 while True: try: n = input() ans = 1 for i in range(1, n+1): ans *= i print ans except EOFError: break
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> &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>
s481900776
p00019
Accepted
import math as m print(m.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> &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>
s478979268
p00019
Accepted
number = int(input()) i = 1 product = 1 for i in range(1,number+1): product = product * i print(product)
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> &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>
s044220254
p00019
Accepted
import sys def fact(n): ret = 1 if n<1: return -1 elif n==1: return 1 else: return n*fact(n-1) line = sys.stdin.readline() inp = int(line) print (fact(inp))
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> &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>
s755195551
p00019
Accepted
#!/usr/bin/env python # -*- coding: utf-8 -*- n = int(raw_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> &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>
s990184601
p00019
Accepted
n = input() ans = 1 for x in xrange(2,n+1): 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> &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>
s400870952
p00019
Accepted
from math import factorial print(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> &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>
s621058966
p00019
Accepted
n=input() a=n while n>1: n-=1 a*=n 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> &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>
s847636572
p00019
Accepted
n=int(input()) s=1 for i in range(n): s*=n n-=1 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> &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>
s898189950
p00019
Accepted
from math import factorial print(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> &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>
s066547462
p00019
Accepted
#coding:utf-8 import math n = 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> &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>
s525779786
p00019
Accepted
n = 1 for i in range(2,int(input()) + 1): n *= i print(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> &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>
s552975569
p00019
Accepted
a,i=input(),1 while a!=0:a,i=a-1,a*i print(str(i))
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> &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>
s558567868
p00019
Accepted
def f(n): if n==1: return 1 else: return n * f(n-1) 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> &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>
s976902756
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> &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>
s927601549
p00019
Accepted
# -*- coding: utf-8 -*- def factorial(n): if n == 1: 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> &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>
s791901678
p00019
Accepted
n = int(input()) f = 1 for x in range(1, n+1): f *= x print(f)
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> &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>
s420622151
p00019
Accepted
def factorial(n): if n==1: return 1 return n*factorial(n-1) n=input() ans=factorial(n) 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> &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>
s009722175
p00019
Accepted
import operator import functools print(functools.reduce(operator.mul, 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> &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>
s835680430
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> &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>
s827874680
p00019
Accepted
v = (1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, 20922789888000, 355687428096000, 6402373705728000, 121645100408832000, 2432902008176640000) print(v[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> &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>
s478552060
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> &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>
s631262586
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> &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>
s481804053
p00019
Accepted
def Factorial(n): fac = 1 for i in range(1, n + 1): fac *= i return fac print(Factorial(eval(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> &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>
s181492360
p00019
Accepted
def fac(n): if n == 0: return 1 return n * fac(n - 1) def main(): n = int(input()) print(fac(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> &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>
s416254417
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> &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>
s558844525
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> &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>
s197722065
p00019
Accepted
print reduce(lambda a,b:a*b, 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> &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>
s588552618
p00019
Accepted
import math line = int(input()) print(math.factorial(line))
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> &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>
s548759108
p00019
Accepted
print(__import__("functools").reduce(lambda a,b:a*b,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> &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>
s067137847
p00019
Accepted
print((lambda n:__import__("functools").reduce(lambda a,b:a*b,range(1,n+1)))(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> &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>
s629407318
p00019
Accepted
n = int(input()) S = 1 for i in range(n): S = S*(n-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> &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>
s484112553
p00019
Accepted
n = raw_input() a = 1 for i in range(int(n)): a *= 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> &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>
s826206345
p00019
Accepted
from math import factorial if __name__ == '__main__': # ??????????????\??? num = int(input()) # ??????????¨???? result = factorial(num) # ???????????¨??? 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> &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>