from functools import lru_cache
@lru_cache()
def yoba(s, n):
if n == 1:
return 0 <= s < 10
return sum(yoba(s - i, n - 1) for i in range(10))
print(yoba(1, 9))
ZnJvbSBmdW5jdG9vbHMgaW1wb3J0IGxydV9jYWNoZQoKQGxydV9jYWNoZSgpCmRlZiB5b2JhKHMsIG4pOgoJaWYgbiA9PSAxOgoJCXJldHVybiAwIDw9IHMgPCAxMAoJcmV0dXJuIHN1bSh5b2JhKHMgLSBpLCBuIC0gMSkgZm9yIGkgaW4gcmFuZ2UoMTApKQoKcHJpbnQoeW9iYSgxLCA5KSk=