2018-08-26 20:32:21 -04:00
|
|
|
try:
|
|
|
|
import math
|
2020-03-22 22:26:08 -04:00
|
|
|
|
2018-08-26 20:32:21 -04:00
|
|
|
math.factorial
|
|
|
|
except (ImportError, AttributeError):
|
2020-03-22 22:26:08 -04:00
|
|
|
print("SKIP")
|
2018-08-26 20:32:21 -04:00
|
|
|
raise SystemExit
|
|
|
|
|
|
|
|
|
|
|
|
for fun in (math.factorial,):
|
|
|
|
for x in range(-1, 30):
|
|
|
|
try:
|
2020-03-22 22:26:08 -04:00
|
|
|
print("%d" % fun(x))
|
2018-08-26 20:32:21 -04:00
|
|
|
except ValueError as e:
|
2020-03-22 22:26:08 -04:00
|
|
|
print("ValueError")
|