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 »

Search

Advanced Search Options

To further refine your search, you can use additional qualifiers such as score:>0.5. For example, the search score:>=0.5 created:<1y grammar would return only posts mentioning "grammar" that have a score >= 0.5 and were created less than a year ago.

Further help with searching is available in the help center.

Quick hints: tag:tagname, user:xxx, "exact phrase", post_type:xxx, created:<N{d,w,mo,y}, score:>=0.5

Filters
1.6k posts
 
60%
+1 −0
Challenges Roll n fair dice

Jelly, 4 bytes X}€S Try it online! How it works X}€S - Main link. Takes n on the left, m on the right € - Over each element of 1 through n: } - With m as its argument: X - Y...

posted 3y ago by caird coinheringaahing‭

Answer
60%
+1 −0
Challenges Roll n fair dice

Vyxal ṪR, 3 bytes (⁰℅ Try it Online! ( # N times... ℅ # Generate a random integer between one and... ⁰ # First argument

posted 3y ago by A username‭

Answer
60%
+1 −0
Challenges Roll n fair dice

Japt -mx, 3 bytes Takes n as the first input and m as the second. ÒVö Try it ÒVö :Implicit map of the range [0,first input) Ò :Negate the bitwise NOT of (i.e., increment) V ...

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

Answer
60%
+1 −0
Challenges Multiply two strings

Haskell, 25 bytes f a=(>>= \c->map(min c)a) Try it online!

posted 3y ago by Hakerh400‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Python 3, 47 42 40 bytes -2 bytes thanks to bastolski lambda n:'#'*n+('\n#'+' '*(n-2)+'#')*~-n Try it online! Python's string multiplication is really useful.

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

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Vyxal, 13 bytes \#*,‹(⇩\#꘍ṘǏ, Try it Online! \#*, # Print a line of # ‹( # n-1 times... ⇩\#꘍Ṙ # n-2 spaces before a hash Ǐ, # Append a hash and print

posted 3y ago by A username‭

Answer
60%
+1 −0
Challenges In The Jailhouse Now

Ruby, 53 bytes ->n{n-=3;[?╔+?╦*n+?╗,*[?╠+?╬*n+?╣]*(n+1),?╚+?╩*n+?╝]} Try it online!

posted 3y ago by snail_‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Japt -R, 11 10 bytes ÆQ+ùUÉÃvçQ Try it ÆQ+ùUÉÃvçQ :Implicit input of integer U Æ :Map the range [0,U) Q : Quotation mark + : Append another ...

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

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

JavaScript, 47 bytes n=>`0`.repeat(n)+(` 0`.padEnd(n--)+0).repeat(n) Try it online! My first pass used recursion before I realised I was over thinking things! First 51 byte version inclu...

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

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

JavaScript, 19 bytes x=>y=>x-2|y-2?x+y:5 Try it online!

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges My house is destroyed! Can you make me one?

Rockstar, 82 bytes listen to N let N be-2 X's-1 say "##"+"#"*N while N-X say "#"+" "*N+"#" let X be+1 Try it (code will need to be pasted in)

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

C (gcc), 33 31 bytes f(x,y){return x+y+(x==2&y==2);} Try it online! Saved two bytes thanks to Shaggy

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

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

Husk, 7 bytes +±Λ=2¹Σ Try it online! Input as a list.

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Sandbox Generalized Sort

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

60%
+1 −0
Challenges Make $2 + 2 = 5$

Ruby, 23 bytes ->a,b{a==2&&b==2?5:a+b} Try it online!

posted 3y ago by snail_‭

Answer
60%
+1 −0
Sandbox Abbreviate everything [released]

posted 3y ago by General Sebast1an‭  ·  edited 1y ago by trichoplax‭

60%
+1 −0
Challenges "Hello, World!"

Turing Machine.io, 202 bytes 0 1 101 3 1 2 0 0 2 108 3 1 3 0 0 3 108 3 1 4 0 0 4 111 3 1 5 0 0 5 44 3 1 6 0 0 6 32 3 1 7 0 0 7 87 3 1 8 0 0 8 111 3 1 9 0 0 9 114 3 1 a 0 0 a 108 3 1 b 0 ...

posted 3y ago by 22t‭

Answer
60%
+1 −0
Challenges Make my value binary

Japt, 1 byte ¤ Try it or run all test cases

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make my value binary

JavaScript, 16 bytes n=>n.toString(2) Try it online!

posted 3y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Make my value binary

Sclipting, (UTF-16) 14 bytes 要감啃終丟併反 Explanation: Push input 要 While the top number is non-zero 감啃 Shift the top number by 1 bit and push both the bit and shifted result 終 End lo...

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Reduce over the range [1..n]

C (gcc), 50 bytes f(int(*o)(i,j),int n){return n-1?o(f(o,n-1),n):1;} Try it online!

posted 3y ago by celtschk‭

Answer
60%
+1 −0
Challenges Make my value binary

Haskell, 29 bytes import Text.Printf printf"%b" Try it online! Without builtins: Haskell, 37 bytes f n|n<2=[n]|0<1=f(div n 2)++[rem n 2] Try it online!

posted 3y ago by Hakerh400‭

Answer
60%
+1 −0
Challenges Make my value binary

Python 3, 3 bytes bin Try it online!

posted 3y ago by Quintec‭

Answer
60%
+1 −0
Challenges Generalized Sort

JavaScript (Node.js), 52 bytes (A,...c)=>A.sort((a,b)=>c.map(z=>z(a,b)).find(x=>x)) Try it online! A golf of the reference code. If we can assume there will be no ties, 47 is po...

posted 3y ago by A username‭

Answer
60%
+1 −0
Challenges Make my value binary

Ruby, 11 bytes ->n{"%b"%n} Simple string formatting. Try it online!

posted 3y ago by snail_‭

Answer