7th Birthday
We have a bunch of numbers written from 0 to 9 in the order present in the text input file. The task is to create 7 by replacing the numbers with dashes.
Start file
12345678901234 23456789012345 34567890123456 45678901234567 56789012345678 67890123456789 78901234567890 89012345678901 90123456789012
End file
12----------- 2--56789012--5 3456789012--56 456789012--567 56789012--5678 6789012--56789 789012--567890 89012--5678901 9012--56789012
View Diff
1,9c1,9 < 12345678901234 < 23456789012345 < 34567890123456 < 45678901234567 < 56789012345678 < 67890123456789 < 78901234567890 < 89012345678901 < 90123456789012 --- > 12----------- > 2--56789012--5 > 3456789012--56 > 456789012--567 > 56789012--5678 > 6789012--56789 > 789012--567890 > 89012--5678901 > 9012--56789012
Solutions
The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!
Check out these helpful resources to improve your Vim skills... Game on.
Unlock 74 remaining solutions by signing in and submitting your own entry
#75 captain_morgan / @captain_morgan - Score: 41 - 10/17/16 @ 21:08
v$r-$x<CR>:s/34/--/g<CR><CR>/<CR>R--<Esc><CR>VG:s/34/--<CR>ZZ
0 comments