Code Festival D Compress numbers by llhuii

awk 'a=e$2{for($(c=i=FS=e)=$1;e$++i;c=$i%10)(q=sub("^"c,e,a))||$i+=c;FS=OFS}$0=(a?c~a||(e~c&&q):!c)?"YES":"NO"'

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page