Untitled

 avatar
unknown
python
2 years ago
204 B
5
Indexable
def F(s, f, n):
    if s > f:
        return 0
    if s == f:
        return 1
    if s < f and n < 7:
        return F(s + 1, f, n + 1) + F(s + 2, f, n + 1) + F(s + 3, f, n + 1)
print(F(3, 22, 7))
Editor is loading...