Any programming language may be used. 1 point will be given if you pass all the test cases with 1 bonus point going to whoevers performs the quickest and 1 for whoever can get the least amount of characters
To submit put the code and the language you used below
@[email protected] - 0.053s - 359 chars (factor)
If you submitted in factor, ruby, cobol, etc. itll take me a bit longer to check since I havent set up running those yet. Should be soon
import sys
from itertools import pairwise as p
print(''.join(c+str(b-a)for(a,c),(b,_)in p([(i,r)for i,(l,r)in enumerate(p([None,*sys.argv[1],None]))if l!=r])))