Untitled

mail@pastecode.io avatar
unknown
python
a year ago
204 B
0
Indexable
Never
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))