Post History
JavaScript (Node.js), 31 bytes f=(a,b)=>a<0?0:b<0?1:1+f(b,a-b) Try it online!
Answer
#2: Post edited
- # [JavaScript (Node.js)], 31 bytes
- <!-- language-all: lang-javascript -->
f=(a,b)=>a>0?b>0?1+f(b,a-b):1:0[Try it online!][TIO-khks0wgu]- [JavaScript (Node.js)]: https://nodejs.org
[TIO-khks0wgu]: https://tio.run/##bcxBDoMgEIXhfU8CcWhmQKNIsGcZrJg2RkxtvD66Nize5v@S9@WD9/H32f5qTe8p5@gFQ5B@4AFf4RpVUQRgFWRPPWY3pnVPy/Rc0iyiII3QkpTucQckqHUBGkSorS2I6VooXRlQpLsCKA3myvkE "JavaScript (Node.js) – Try It Online"
- # [JavaScript (Node.js)], 31 bytes
- <!-- language-all: lang-javascript -->
- f=(a,b)=>a<0?0:b<0?1:1+f(b,a-b)
- [Try it online!][TIO-khksebli]
- [JavaScript (Node.js)]: https://nodejs.org
- [TIO-khksebli]: https://tio.run/##bczLCoMwEIXhfZ8koZMyk1jitT7LRE1pESMqvn7quszmLP4PzpdP3oftsx5mSeOUc@wUQ9Ddi1vssQ7XUk33qAKwCTo3Q1r2NE@POb1VVGQRPGnd3P4BCQorwBMRiqoSxJUepCsHhmwpgLHghOzBXzX/AA "JavaScript (Node.js) – Try It Online"
#1: Initial revision
# [JavaScript (Node.js)], 31 bytes <!-- language-all: lang-javascript --> f=(a,b)=>a>0?b>0?1+f(b,a-b):1:0 [Try it online!][TIO-khks0wgu] [JavaScript (Node.js)]: https://nodejs.org [TIO-khks0wgu]: https://tio.run/##bcxBDoMgEIXhfU8CcWhmQKNIsGcZrJg2RkxtvD66Nize5v@S9@WD9/H32f5qTe8p5@gFQ5B@4AFf4RpVUQRgFWRPPWY3pnVPy/Rc0iyiII3QkpTucQckqHUBGkSorS2I6VooXRlQpLsCKA3myvkE "JavaScript (Node.js) – Try It Online"