Skip to content

Commit 0c68766

Browse files
committed
[uva] Add Python3 solution for 623 - 500!.
1 parent 3d8340a commit 0c68766

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

uva/00623-1.ans

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
10!
2+
3628800
3+
30!
4+
265252859812191058636308480000000
5+
50!
6+
30414093201713378043612608166064768844377641568960512000000000000
7+
100!
8+
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000

uva/00623-1.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
10
2+
30
3+
50
4+
100

uva/00623.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python3
2+
# https://uva.onlinejudge.org/external/6/623.pdf
3+
while True:
4+
try:
5+
n=int(input())
6+
print(str(n)+'!')
7+
k=1
8+
for i in range(1,n+1):k*=i
9+
print(k)
10+
except:break

uva/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ There are solutions for the following
2525
([problem site](https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=6&problem=400))
2626
* [579 - Clock Hands](00579.cc)
2727
([problem site](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=520))
28+
* [623 - 500!](00623.py)
29+
([problem site](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=564))
2830
* [793 - Network Connections](00793.cc)
2931
([problem site](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=734))
3032
* [10004 - Bicoloring](10004.cc)

0 commit comments

Comments
 (0)