Birthday Cake Candles

Sort by

recency

|

5349 Discussions

|

  • + 0 comments

    M = max(candles) return len([candle for candle in candles if candle == M])

  • + 0 comments
    def birthdayCakeCandles(candles):
        # Write your code here
        maximum = candles[0]
        count = 0;
        for i in candles:
            if i > maximum:
                maximum = i
                count = 1
            elif i == maximum:
                count += 1
        return(count)
    
  • + 0 comments
    def birthdayCakeCandles(candles):
        # Write your code here
        maxi=candles[0]
        count=0
        for i in range(candles_count):
            if candles[i]>maxi:
                maxi=candles[i]
        for i in range(candles_count):
            if maxi==candles[i]:
                count+=1
        return count
    
  • + 0 comments

    include

    using namespace std;

    using ll = long long;

    int main(){ int n; cin >> n; multiset s; for (int i = 0; i < n; i++){ int temp; cin >> temp; s.insert(temp); } cout << s.count(*s.rbegin()); }

  • + 0 comments

    This solution to the Birthday Cake Candles problem is clear and efficient—just like how Zebra Blinds in Miami bring a clean and modern look to any space by balancing light and privacy perfectly. If you’re interested in sleek window treatments,

    check out Zebra Blinds in Miami for stylish options that blend form and function seamlessly!