The simplest algorithm: seeking two minimal multiple

zhaozj2021-02-16  110

This algorithm comes from me to participate in the interview, the main examiner asked me this algorithm, even though I made it out, but afterwards, I exchanged with him, and the algorithm he wrote made me really admire:

Function min_multiple (x, y) DIM R R = x while not (r mod y = 0) r = r x wend min_multiple = rend function <% function min_multiple (x, y)? DIM R? r = x? While NOT (r mod y = 0)? r = r x? wend? min_multiple = rend function%>

转载请注明原文地址:https://www.9cbs.com/read-11001.html

New Post(0)