Timeline for Replace 0s In a String With Their Consecutive Counts
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2022 at 15:25 | history | edited | D. Ben Knoble | CC BY-SA 4.0 |
double backslashes in <code>
|
Dec 22, 2022 at 23:13 | comment | added | D. Ben Knoble | Thanks @DLosc, edited. | |
Dec 22, 2022 at 23:13 | history | edited | D. Ben Knoble | CC BY-SA 4.0 |
added 207 characters in body
|
Dec 22, 2022 at 18:22 | comment | added | DLosc |
Here's a TIO link for you. The % isn't necessary because the input "contains only digits from 0 to 9" and therefore contains no newlines. However, if your language is Vim and not V, I think you have to count the Enter keypress after the replace command (otherwise, the replacement doesn't happen), so that makes it 28 bytes. If you want to call it V instead of Vim, you can skip the newline and claim 27 bytes.
|
|
Dec 22, 2022 at 15:54 | history | answered | D. Ben Knoble | CC BY-SA 4.0 |