Post History
Prolog (SWI), 42 bytes R-S:-S is R*R;R<S,M is R+1,M-S. f(S):-0-S. Try it online!
Answer
#1: Initial revision
# [Prolog (SWI)], 42 bytes R-S:-S is R*R;R<S,M is R+1,M-S. f(S):-0-S. [Try it online!][TIO-kryzpn24] [Prolog (SWI)]: http://www.swi-prolog.org [TIO-kryzpn24]: https://tio.run/##KyjKz8lP1y0uz/z/P0g32Eo3WCGzWCFIK8g6yCZYxxfM0TbU8dUN1uNK0wjWtNI1ADL//0/TMNDUAwA "Prolog (SWI) – Try It Online"