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 75 remaining solutions by signing in and submitting your own entry
#76 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
Created by: @pradeep6kumar Tweet
76 active golfers, 210 entries
Leaderboard (lowest score wins):
#61 - ๐๐๐๐๐๐๐ ๐๐๐ข๐๐๐๐๐ / @TitouanT_
03/03/2019 at 03:51PM
#69 - Pradeep Kumar ๐ฎ๐ณ๐ฎ๐ณ๐ฎ๐ณ๐ฎ๐ฑ๐ฎ๐ฑ๐ฎ๐ฑ / @pradeep6kumar
10/10/2016 at 04:44PM