Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Posts by Shaggy‭

120 posts
60%
+1 −0
Challenges Find the IP address class

Japt, 15 bytes Port of m90's JS solution, until I manage to come up with something shorter. ;Bg7^Mm8|#ÿ^3îU Try it

posted 29d ago by Shaggy‭  ·  edited 28d ago by Shaggy‭

Answer
60%
+1 −0
Challenges Multiplicative perfection

JavaScript, 36 bytes n=>n==(g=d=>--d?(n%d?1:d)*g(d):1)(n) Try it online!

posted 2mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Multiplicative perfection

Japt v1.4.5, 4 bytes ¶â¬× Try it ¶â¬× :Implicit input of integer ¶ :Is equal to ⬠:Proper divisors × :Reduced by multiplication

posted 2mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges How many odd digits?

JavaScript, 25 bytes Input as an array of digits a=>a.map(x=>t+=x%2,t=0)|t Try it online! 26 bytes With input as a string (or an array of digit strings). f=([d,...a])=>d?d%2+f(a):0...

posted 3mo ago by Shaggy‭  ·  edited 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges How many odd digits?

Japt -mx, 2 1 byte u Try it u :Implicit map of input array u :Modulo 2 :Implicit output of sum of resulting array

posted 3mo ago by Shaggy‭  ·  edited 1mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Fibonacci without consecutive digits

Japt, 17 bytes 0-indexed gU²o!gM fÈì äa eÉ Try it 15 bytes 1-indexed @µXì äa eÉ}f!gM Try it

posted 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Substring factor

JavaScript, 42 bytes s=>(g=n=>--n&&s.includes(s%n?g:n)|g(n))(s) Try it online!

posted 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Substring factor

Japt v1.4.5, 7 bytes â¬d!øUs Try it â¬d!øUs :Implicit input of integer U ⬠:Divisors, excluding itself d :Are any !ø : Contained in Us : The s...

posted 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges Hex ​​​detector

Japt -d, 8 bytes °*U*3¥NÉ Try it 9 bytes NøT±1wU*6 Try it

posted 5mo ago by Shaggy‭  ·  edited 3mo ago by Shaggy‭

Answer
50%
+0 −0
Challenges Mediocre pop count

JavaScript, 104 102 99 bytes I/O as a character array. a=>a.filter(x=>a<g(x)&g(x)<a[~-a.length],a=a.map(g=x=>[...Buffer(x)[0].toString(2)].sort()).sort()) Try it online!

posted 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Backspace an array

Japt, 9 bytes ô rÈÔÅÔcY Try it or run all test cases ô rÈÔÅÔcY :Implicit input of array ô :Split on falsey elements (i.e., 0) r :Reduce by È :Passing...

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Lowercase, but not just the letters

JavaScript, 52 51 28 bytes s=>Buffer(s).map(x=>x|32)+`` Try it online! -1 byte thanks to trichoplax‭.

posted 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Determine whether an integer is square-free

JavaScript, 31 bytes Outputs 0 for falsey and a non-zero value for truthy. If the 2 values must be consistent then replace the last * with && to output true instead. n=>(g=d=>d++&...

posted 2y ago by Shaggy‭  ·  edited 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Create a range grid

Japt -m, 4 bytes VÆT° Try it

posted 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Make a frequency table (histogram)

Japt, 8 bytes ü ®â pZl Try it

posted 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Find n Niven Numbers

Japt, 10 bytes ÈvXìx}jU1ì Try it

posted 2y ago by Shaggy‭

Answer
50%
+0 −0
Challenges A number adder, not a death adder

Rockstar, 40 bytes listen to N say "listen to N say N-0+"+N Which outputs P2, where X is the input from P1: listen to N say N-0+X Try it here (Code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
50%
+0 −0
Challenges The Pell Numbers

JavaScript, 26 bytes Outputs the nth term, 0-indexed. f=n=>n<2?n:f(--n)*2+f(--n) Try it online! JavaScript, 49 bytes Outputs the first n terms as a comma delimited string. f=n=&gt...

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Create a Sudoku

Japt, 10 bytes Outputs a 2D-array. 9õ ñu3 £éX Try it 9õ ñu3\n£éX 9õ :Range [1,9] ñ :Sort by u3 : Mod 3 of each \n :Assign to variabl...

posted 3y ago by Shaggy‭

Answer
50%
+0 −0
Challenges Prime Difference

Japt, 15 14 bytes @§XnÈj}aX+j}a2 Try it or run all test cases @§XnÈj}aX+j}a2 :Implicit input of integer U @ :Function taking an integer X as argument § ...

posted 3y ago by Shaggy‭  ·  edited 3y ago by Shaggy‭

Answer