Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Optimized solution in Speedy category for Colorful Disks by StefanPochmann
def count_discs(discs):
count = R = 0
rev = reversed(discs)
for r in rev:
if R < r:
for R in rev:
if r < R:
count += 2
break
else:
return count + 1
return count
May 25, 2024
Comments: