I came across this problem here. It was a programming contest held earlier this year.
Here is the summary :
Given an array of N integers, find LCM of all consecutive M integers.
For e.g.
Array = [3,5,6,4,8] (hence N = 5)
M = 3
Output :
LCM(3,5,6) = 30
LCM(5,6,4) = 60
LCM(6,4,8) = 24
In fact there's a solution sketch here but I couldn't understand the Dynamic Programming Part.
So if someone could elaborate on the same solution with some examples it will be great.
A new, easy to understand solution will also be appreciated.