Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Creative category for Ghost Detect by eugene100372
from itertools import pairwise
from re import split
def recognize(signal: int) -> bool:
return all(s1==s2 for s1,s2 in pairwise(split('0+',bin(signal)[2:])))
May 11, 2025