Function not returning anything

My function does not return anything, even after I explicitly return a number. Perhaps an IDE error?

Same here. Tried in C++ and python.

Click here to start solving coding interview questions