Skip to content

Instantly share code, notes, and snippets.

@kurahaupo
Last active Nov 19, 2018
Embed
What would you like to do?
/^[0-9]*$/!n
:a
s/^[07]*//
s/^[18]5\|^[29][29]\|^36\|^43\|^5[07]\|^64/1/
s/^[18]6\|^[29][07]\|^3[29]\|^44\|^5[18]\|^65/2/
s/^[18][07]\|^[29][18]\|^33\|^45\|^5[29]\|^66/3/
s/^[18][18]\|^[29][29]\|^34\|^46\|^53\|^6[07]/4/
s/^[18][29]\|^[29]3\|^35\|^4[07]\|^54\|^6[18]/5/
s/^[18]3\|^[29]4\|^36\|^4[18]\|^55\|^6[29]/6/
ta
s/^$/0/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment