Help me for solve my code

UKHeliBob:
We won't know until the OP replies, but I can't help feeling that there is some confusion between 2400 hours (ie midnight) and the need to allow for 24 hours in the day.

Yeah, the initial mention of 800,1200,2000,2400 Hrs does sound more like times in a 24-hour period rather than a 2400 hour period, but the code does definitely allow for 2400 hours rather than 24 hours. Perhaps the OP is confused about the distinction.