Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def can_parse(s):
- return s != "0"
- def get_end_month(s):
- return int(s.split()[-1])
- if __name__ == "__main__":
- m = int(input())
- months = []
- while True:
- line = input()
- if line == "0": break
- months.append(get_end_month(line))
- print(len(tuple(filter(
- lambda month: month == m,
- months
- ))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement