Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Colorful Disks by U.V
def count_discs(discs: tuple[int, ...]) -> int:
n=r=0
for d in discs[::-1]:
n+= d>r
r =max(r,d)
return n
July 1, 2024