what will be the answer either 30 or 31 for this time based question? A red light flashes 3 times per minute and a green light flashes 5 times in two minutes at regular intervals. If both lights start flashing at the same time, how many times do they flash together in each hour?

according to me solution is
Red light flashes every 20 seconds

Green light flashes every 24 seconds

Therefore, they will flash together every 120 seconds

In an hour they will flash 3600/120 = 30 

Now since they started with flashing at the same time then 1 more flash will be added isn't it ?
so answer will be 30 + 1 = 31 that is at time 0 , 120 , 240 .....3600 => total = 31 
so the answer should be 30 or 31 ?
I see this (31) as correct in the context of a math competition question depending on the wording. However, for realism, the flash of light would not be instantaneous, so 30 flashes occur in a one hour block.

to be more clear, the question wants to know how often they flash together in "each hour," so we want 30 because it flashes every two minutes and there are 60 minutes in an hour. Suppose we thought about an hour that started one second after both flashes occurred. In this case, there would still be 30 flashes in the hour.  However, if we wanted to know how many flashes occurred in the first hour, assuming that they start at the same time, and the flashes take 0 time, then it is 31. 

Consider the following. You have 100 feet of fencing. You want to make a fence that is 100 feet long. But you need to put up a fence-post every ten feet. How many fence posts do you need. Well for every ten feet, you need to add one more fence post, but for 100 feet, you need 11 fence-posts because you need to have a post at both the beginning and the end of the fence.
If you have established the convention that the occurrence of the simultaneous flash (when the second-hand is perfectly vertical) is to be associated with the minute which FOLLOWS that event; then, when that event occurs next, you cannot (logically) change your mind to say that the event is to be associated with the minute which PRECEDES it. You must be consistent. Thirty gets my vote!