There is only one Big Clock in the Alibaba’s headquarters on Mars. Since it is on Mars, the Clock is different as it was on Earth.
There are A hours per day and B minutes per hour. The Clock has two hands, the hour hand and the minute hand. The hour hand travels 360 degrees per day and the minute hand travels 360 degrees per hour. Both hands travel consecutively.
But for some reason, the Clock is not very steady. One day the Clock drops off the wall, but fortunately, it is still working. So they plans to put it back onto the wall. But they soon found a problem: it’s the only clock they have, so they don’t know the current time now. Clock only shows the relative position between the two hands, but doesn’t show how to place it (as there are no marks on it), so it can be rotated and represent several different times.
They want your help to determine how many different times the clock may represent.