Birthday Cake Candles

Sort by

recency

|

5355 Discussions

|

  • + 0 comments

    Your post about birthday cake candles actually reminded me of something funny but relevant — we recently got called in to do flooring strip and wax services the night before a kid’s birthday party. The parents were going all out: balloons, cake, themed decor — but realized the floors were dull and sticky from years of wear.

    After we stripped and waxed the floors, it totally changed the vibe of the space. Everything — including those cake candles — looked better under clean, polished floors and bright lighting. Sometimes the little details like the floor shine can really elevate an event’s atmosphere!

    Anyway, just thought I’d share that — never thought our cleaning work would be part of a birthday party prep, but here we are.

  • + 0 comments

    For Python: def birthdayCakeCandles(candles): # Write your code here return candles.count(max(candles))

  • + 0 comments

    Laying deck boards by deck builder is like placing birthday cake candles — alignment matters. One wrong move, and the whole look (and structure) can feel off that i want to use it for my Wordpress Website.

  • + 0 comments
    def birthdayCakeCandles(candles):
        return candles.count(max(candles))
    
  • + 0 comments

    Python 3 using list comprehension:

    import os
    
    def birthdayCakeCandles(candles):
        tallest_candle = max(candles)
        num_tallest = sum([c == tallest_candle for c in candles])
        return num_tallest
    
    if __name__ == '__main__':
        fptr = open(os.environ['OUTPUT_PATH'], 'w')
    
        candles_count = int(input().strip())
        candles = list(map(int, input().rstrip().split()))
        result = birthdayCakeCandles(candles)
    
        fptr.write(str(result) + '\n')
        fptr.close()