Recursive Function

Limits: 1s, 512 MB

A common example of recursion goes something like this:

It is of course easy to calculate the value of this function for any x when the values of X0 and X1 are known. However, your task is to find the value of recur for a given number without being given the values of X0 and X1. Instead, you are given the values of recur(a) and recur(b) for given values of a and b.


This is a companion discussion topic for the original entry at https://toph.co/p/recursive-function