Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
itertools.groupby solution in Clear category for Ghost Detect by kurosawa4434
from itertools import groupby
def recognize(signal: int) -> bool:
return len({tuple(g) for k, g in groupby(bin(signal)[2:]) if int(k)}) == 1
Nov. 17, 2024
Comments: