Birthday Cake Candles

  • + 0 comments

    ar_count = int(raw_input())

    ar = list(map(int, raw_input().strip().split()))

    max_height = max(ar)

    print(ar_count - len(list(filter(lambda x: x!=max_height,ar))))) Try this! It worked when I split max into a different line.