An employee if he had breakfast after 11:00 am on a given day, skips lunch on that specific day. So given the time of his breakfast for N days, the program must print the number of days he has skipped lunch.
Boundary Condition(s):
1 <= N <= 100
Input Format:
The first line contains N.
The second line contains the breakfast time in 24 hours format for the N days each separated by a space.
Output Format:
The first line contains the count of days.
Example Input/Output 1:
Input:
5
10:00 11:00 11:01 9:00 11:05
Output:
2
n=int(input())
l=[index.split(":") for index in input().split()]
flag=0
for i in l:
if int(i[0])>11 or int(i[0])==11 and int(i[1])>0:
flag+=1
print(flag)
Leave a Reply