Post History
awk, 35 bytes Takes input as newline-separated list of binary strings. awk '{gsub(/11+|0+/,_);$0=length}1' strip all runs of 0s and two or more 1s print length of remaining string
#3: Post edited
- awk, 35 bytes
- -----
Takes input as newline-separated lis of binary strings.- ```
- awk '{gsub(/11+|0+/,_);$0=length}1'
- ```
- * strip all runs of 0s and two or more 1s
- * print length of remaining string
- awk, 35 bytes
- -----
- Takes input as newline-separated list of binary strings.
- ```
- awk '{gsub(/11+|0+/,_);$0=length}1'
- ```
- * strip all runs of 0s and two or more 1s
- * print length of remaining string
#2: Post edited
- awk, 35 bytes
- -----
Take input as binary string.- ```
- awk '{gsub(/11+|0+/,_);$0=length}1'
- ```
- * strip all runs of 0s and two or more 1s
- * print length of remaining string
- awk, 35 bytes
- -----
- Takes input as newline-separated lis of binary strings.
- ```
- awk '{gsub(/11+|0+/,_);$0=length}1'
- ```
- * strip all runs of 0s and two or more 1s
- * print length of remaining string
