Activity for Shaggy
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Answer | — |
A: Presumptuous base conversion JavaScript, 73 71 63 53 52 bytes Well, this ain't pretty at all! Will need to take another pass over it to try to improve upon it, maybe with recursion.Yeah, I was completely overthinking this one! s=>parseInt(s,`0x`+[...s].sort().pop()-0)||s.length Try it online! (Includes all test ... (more) |
— | over 2 years ago |
Edit | Post #287044 |
Post edited: |
— | over 2 years ago |
Edit | Post #287044 | Initial revision | — | over 2 years ago |
Answer | — |
A: Presumptuous base conversion Japt, 13 bytes Takes input as a character array. mnG ìUrÔÄ ªUl Try it mnG\nìUrÔÄ ªUl :Implicit input of character array U m :Map n : Convert from base G : 16 \n :Reassign to U ... (more) |
— | over 2 years ago |
Edit | Post #286972 |
Post edited: |
— | over 2 years ago |
Comment | Post #285511 |
[6 bytes](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&code=ayDkpiBl&input=MjA) (more) |
— | over 2 years ago |
Edit | Post #286986 | Initial revision | — | over 2 years ago |
Answer | — |
A: Looping counter Japt, 6 bytes ßOpP±Q Test it ßOpP±Q ß :Recursive call Op :Output with trailing newline P :Empty string, initially ± :Append Q :Quotation mark (more) |
— | over 2 years ago |
Edit | Post #286973 | Initial revision | — | over 2 years ago |
Answer | — |
A: Determine whether an integer is square-free Japt, 5 bytes k eUâ Try it (more) |
— | over 2 years ago |
Edit | Post #286972 | Initial revision | — | over 2 years ago |
Answer | — |
A: Looping counter JavaScript, 25 bytes Could be 21 but calling the function like that feels like cheating. (f=s=>f(s+=8,print(s)))`` Try it online! 22 bytes Didn't want to post this as my main solution as it's pretty much the same as Moshi's. for(s=``;;)print(s+=8) Try it online! (more) |
— | over 2 years ago |
Edit | Post #286971 | Initial revision | — | over 2 years ago |
Answer | — |
A: Create a range grid Japt `-m`, 4 bytes VÆT° Try it (more) |
— | over 2 years ago |
Edit | Post #286970 | Initial revision | — | over 2 years ago |
Answer | — |
A: Make a frequency table (histogram) Japt, 8 bytes ü ®â pZl Try it (more) |
— | over 2 years ago |
Comment | Post #286632 |
[32 bytes](https://tio.run/##RY3BCoMwEETP5iv2JAmsUttqDxJ/RHIIxpQWa8QEL2J/PU1SSmHYGR7DzlNu0g7rY3HFbNToNfeSd7J8yYVuvFP9JnjxjoaK7wfLc@UHM1sHbrTOAoeeZH2FEHRGuCDUCE2QwMDTqRK4/SpNUsh1KF9DOgkiWkK0WYH@X4PR3wkGO8kiN9NYTuZOI0XQyRlryeE/) (more) |
— | over 2 years ago |
Edit | Post #286969 | Initial revision | — | over 2 years ago |
Answer | — |
A: Find n Niven Numbers Japt, 10 bytes ÈvXìx}jU1ì Try it (more) |
— | over 2 years ago |
Comment | Post #284951 |
Does the case of the output matter? Can we output all lowercase or all uppercase? (more) |
— | over 3 years ago |
Edit | Post #284746 | Initial revision | — | over 3 years ago |
Answer | — |
A: "Hello, {name}!" JavaScript, 28 bytes alert(`Hello, ${prompt()}!`) Try it online! (more) |
— | over 3 years ago |
Comment | Post #284516 |
https://tio.run/##zZRBbsIwEEXX@BTe2VaCM3ZbJFolHKJLYBGmtguKbJRYCAk4ewpOpfYG@K9m3t@81T@0p3bAfn@Mcx@@zGjr8Vw3Z9mbY9ei4RWXUmzUBcqFvlWu5Fg6UTfYMGTXK67ftiuulrpA2Rnv4nelhYzhM/Z777haiMK9oxgx@CHSaIY40JquyYwBgAINL/DKyumFhBRAAjuzswioUP/vn5QMFDKRyEbjV8Q@NRkoZCKRjUYS2X4QYkNP@d/u0GCn/RH0QmYPHjoju@B4agvKNp7OG8rup01... (more) |
— | over 3 years ago |
Edit | Post #284520 | Initial revision | — | over 3 years ago |
Answer | — |
A: Operation "Find The Operator" Japt, 16 bytes Takes the result as the first input and the other 2 values as an array as the second input. Uses `z` for floor division & `p` for exponentiation and outputs `"` if there's no match (costing 3 bytes :\\) "+-z%p"ƶVrXêQ Try it (more) |
— | over 3 years ago |
Comment | Post #284463 |
Is there an option to not have them at all? I don't see what value they'd add that isn't already covered by being able to upvote or downvote a solution? If they awarded rep then maybe I could see value in the "Works for me" one if it awarded twice the rep - a way of awarding a bounty to a solution un... (more) |
— | over 3 years ago |
Edit | Post #282202 |
Post edited: |
— | over 3 years ago |
Comment | Post #284407 |
Can we use our language's native operators (e.g., `p` in Japt for exponentiation)? I'm guessing from your use of `.` in the test cases we can. Also, you need to mention that `/` is floor/integer division. (more) |
— | over 3 years ago |
Comment | Post #284145 |
[46 bytes](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUSHPKjpPN1MrUyG/SCG1IrNEw1AzDcjMVMjMUyhKzEtP1TDUztOM/Z@mYaD5HwA) as a lambda. (more) |
— | over 3 years ago |
Comment | Post #284145 |
Could you reverse the condition to get it down to [52 bytes](https://tio.run/##K6gsycjPM7YoKPr/Py2/SCFTITNPoSgxLz1Vw1Bbo8LKNjOvRCMzr6C0REMTCKwqdDO1MhWAClMrMks0DDX//zcAAA)? (not a Python guy so it'll need verifying) (more) |
— | over 3 years ago |
Edit | Post #283771 |
Post edited: |
— | over 3 years ago |
Edit | Post #284041 |
Post edited: |
— | over 3 years ago |
Edit | Post #284110 |
Post edited: |
— | over 3 years ago |
Edit | Post #284186 |
Post edited: |
— | over 3 years ago |
Edit | Post #284187 | Initial revision | — | over 3 years ago |
Answer | — |
A: Collatz conjecture; Count the tries to reach $1$ JavaScript, 28 bytes f=n=>n-1&&-f(n%2?n3+1:n/2) Try it online! (more) |
— | over 3 years ago |
Edit | Post #284186 | Initial revision | — | over 3 years ago |
Answer | — |
A: Collatz conjecture; Count the tries to reach $1$ Japt, 15 bytes É©Òß[U3ÄUz]gUv Try it É©Òß[U3ÄUz]gUv :Implicit input of integer U É :Subtract 1 © :Logical AND with Ò :Negate the bitwise NOT of (i.e., increment) ß :Recursive call with inp... (more) |
— | over 3 years ago |
Comment | Post #284132 |
This _does_ nothing if the input isn't square. [This 44 byte version](https://tio.run/##K8go@P/fxr4go0AhNTkjX0Ol0ra4sKhEQ6XCNi09taRYIzjExdNPU1NTCyhjq1Jh/f@/AQA), though, will _output_ nothing, which is falsey, if the input isn't square. Although, it can be done in at least 26 bytes ;) (more) |
— | over 3 years ago |
Comment | Post #284145 |
This exits with `0` for both 0 & 1, which are perfect squares. (more) |
— | over 3 years ago |
Comment | Post #284127 |
https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVE&code=4CD8yst4X9cqSnBF&input=WzEsIDIsIDNd
The `*JpE` is annoying me but I can't figure out a way to shorten it right now. (more) |
— | over 3 years ago |
Edit | Post #283158 |
Post edited: |
— | over 3 years ago |
Edit | Post #283158 |
Post edited: |
— | over 3 years ago |
Edit | Post #283158 |
Post edited: |
— | over 3 years ago |
Comment | Post #284117 |
https://tio.run/##K8go@P/fxt5WCYhjVBKL0suiDWO1YQxrJev///8bGgAA (more) |
— | over 3 years ago |
Comment | Post #284091 |
https://tio.run/##K8go@P/fIzUnJ19HwcbeViWxKL0s2jDW3k7x////volF2QrumUWJaWmpAA (more) |
— | over 3 years ago |
Edit | Post #284120 | Initial revision | — | over 3 years ago |
Answer | — |
A: Reverse an ASCII string Rockstar, 67 bytes listen to S split S O's"" while S roll S into C let O be C+O say O Try it here (Code will need to be pasted in) (more) |
— | over 3 years ago |
Edit | Post #284119 | Initial revision | — | over 3 years ago |
Answer | — |
A: Evens or Odds - you know this one Rockstar, 44 bytes Outputs `1` for odd or `0` for even. listen to N let M be N/2 turn up M say M2-N Try it here (Code will need to be pasted in) (more) |
— | over 3 years ago |