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 asynchronous c csv data structures dictionaries disk feedhandler finance functions ingestion ipc iterators machine learning math multithreading optimizations realtime shared library sql statistics streaming strings tables temporal utility websockets