Activity for Glory2Ukraine
| Type | On... | Excerpt | Status | Date |
|---|---|---|---|---|
| Edit | Post #295332 |
Post edited: |
— | 8 months ago |
| Comment | Post #295332 |
@#53890 thank you for the clarification; one of the rules in this challenge is "It should work at least for all inputs greater than 0 ", and I took it literally. Anyway I have modified my golf to include the 0-case too. (more) |
— | 8 months ago |
| Edit | Post #295332 |
Post edited: |
— | 8 months ago |
| Edit | Post #295332 | Initial revision | — | 8 months ago |
| Answer | — |
A: Convert to Hexadecimal R, 73 bytes ```r `-`=\(n,s="",`<`=paste0)`if`(n,n%/%16-c(0:9,LETTERS[1:6])[1+n%%16]<s,0<s) ``` Attempt This Online! Similar to the JS and Python answers, but uses recursion. Adds a leading 0 to the output. This way, the case for 0 is solved, with no empty output. (more) |
— | 8 months ago |
