2358. Maximum Number of Groups Entering a Competition

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2358

class Solution:
    def maximumGroups(self, grades: List[int]) -> int:
        n = len(grades)
        return bisect_right(range(n + 1), n * 2, key=lambda x: x * x + x) - 1