Files

8 lines
117 B
Python
Raw Permalink Normal View History

2017-03-17 17:04:23 +01:00
def fact(n):
#@ ensures result >= 1
#@ variant n
if n <= 1:
return 1
return n * fact(n - 1)