Golf to find Boring numbers

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @t varchar(99)='3452514263534543543543543543876514264527473275'

,@z bit=0,@a INT=1,@ INT=1WHILE @a<LEN(@t)SELECT
@z=IIF(@t LIKE'%'+replicate(SUBSTRING(@t,@a,@),5)+'%',1,@z),@=IIF(@=20,1,@+1),@a+=IIF(@=1,1,0)PRINT @z

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results