summaryrefslogtreecommitdiff
path: root/progs/a466.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a466.py')
-rw-r--r--progs/a466.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/a466.py b/progs/a466.py
new file mode 100644
index 0000000..5206c2a
--- /dev/null
+++ b/progs/a466.py
@@ -0,0 +1,6 @@
+def eulerian_num(n, m):
+ if (m >= n or n == 0):
+ return 0
+ if (m == 0):
+ return 1
+ return ((n - m) * eulerian_num(n - 1, m - 1) +(m + 1) * eulerian_num(n - 1, m)) \ No newline at end of file