Least Common Multiple

Question: Define a function 'lcm' that returns the least common multiple of two integers, as an integer.

More Information:

https://en.wikipedia.org/wiki/Least_common_multiple

Example

                                
                                q)lcm[12;80]
240
q)lcm[12;13]
156
q)lcm[12;12]
12
                                
                            

Solution

Tags:
functions math
Searchable Tags
algorithms api architecture csv data structures dictionaries disk feedhandler finance functions ingestion ipc iterators math multithreading optimizations realtime sql streaming strings tables temporal websockets

Email sent!

Email not sent