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.5k posts
 
75%
+4 −0
Challenges Truthify an array

JavaScript (V8), 44 bytes a=>a.map((a,x)=>a.map((n,y)=>n&&print(x,y))) Try it online!

posted 3y ago by Shaggy‭

Answer
75%
+4 −0
Challenges Are they abundant, deficient or perfect?

APL (Dyalog Unicode), 21 bytes {×⍵-+/∪⍵∨¯1↓⍳⍵}¨∘⍳⊢⌸⍳ Try it online! Returns a matrix (padded with zeroes) where the first row is deficient numbers, the second is perfect numbers, and the thi...

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

Answer
75%
+4 −0
Challenges Are they abundant, deficient or perfect?

Vyxal, 30 28 25 bytes Saved 1 4 bytes thanks to Aaron Miller ƛ∆K-±";£kɽƛ¥D„£_'t¥=;vṪ,£ Try it Online! A rather pitiful answer, but hey, it works. Gives deficient numbers, then perfect numbers...

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

Answer
75%
+4 −0
Challenges Are they abundant, deficient or perfect?

Vyxal o, 16 bytes '∆K=;,'∆K<;,'∆K> Try it Online! Checks all numbers to see if they are perfect, then prints the ones that are, then does the same for abundant and deficient numbers. Ex...

posted 3y ago by Aaron Miller‭

Answer
75%
+4 −0
Challenges Weave Strings Together

Risky, 1 byte 0? Try it online! 0 transpose ? input

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

Answer
75%
+4 −0
Challenges Evens or Odds - you know this one

Jelly, 1 byte Ḃ Try it online! Builtin. Returns 0 for even and 1 for odd

posted 3y ago by caird coinheringaahing‭

Answer
75%
+4 −0
Challenges Evens or Odds - you know this one

Japt, 1 byte u Japt, more like JABT (just another builtin) :P Try it

posted 3y ago by Quintec‭

Answer
75%
+4 −0
Challenges Evens or Odds - you know this one

JavaScript (Node.js), 6 bytes n=>n%2 Try it online! Basically does what you'd expect.

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

Answer
75%
+4 −0
Challenges Evens or Odds - you know this one

Scala -language:postfixOps, 2 bytes 1& Try it online! 1 for odd, 0 for even. Scala, 3 bytes _%2 Try it online! 1 for odd, 0 for even.

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges Multiply complex numbers.

Python 3, 98 bytes print(str(eval("("+input().replace(" ",")*(").replace("i","j")+")")).strip("()").replace("j","i")) Try it online! Since the input format is restrictive, I may as well just...

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Roll n fair dice

Python 3, 61 bytes lambda n,m:sum(randint(1,m)for i in[0]*n) from random import* Try it online! This is not an interesting answer as it is just a copy of your code. I tried to do it with ch...

posted 2y ago by bastolski‭

Answer
75%
+4 −0
Challenges Make $2 + 2 = 5$

Vyxal s, 5 bytes 2=A[5 Try it Online! You're not the only one who can abuse flags, Shaggy... 2= # Foreach, is it equal to to? A[ # If all are 2 5 # Push a 5. # (s flag) sum...

posted 2y ago by A username‭

Answer
75%
+4 −0
Challenges Make my value binary

C (gcc), 35 32 bytes Saved 3 bytes thanks to Lundin f(n){n&&f(n/2);putchar(n&1|48);} This solution exploits that leading zeros, while not required, are also not forbidden by the ...

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

Answer
75%
+4 −0
Meta Posting guidelines modifications

Since no one has posited anything yet... I think everything but the last three bullets can be kept. Other than that, we could add in the tips about challenge specifications. Challenges Posting...

posted 2y ago by Moshi‭

Answer
75%
+4 −0
Sandbox Expand a polynomial [FINALIZED]

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

75%
+4 −0
Challenges "Hello, {name}!"

jq, 14 bytes "Hello, \(.)!" Try it online! jq has expression interpolation, pretty epic!

posted 2y ago by Razetime‭

Answer
75%
+4 −0
Challenges When The Ternary Is Balance

Inspired by this Rosetta Code article. Introduction Balanced Ternary is a method of representing integers using -1, 0 and 1 in base 3. Decimal 11 = (1 * 32) + (1 * 31) + (−1 * 30) = [1,1,-1] or ...

3 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by Moshi‭

Question code-golf number base
75%
+4 −0
Challenges 55 fruit salad: choose your own Kolmogorov complexity

This is a fixed output challenge. It is similar to a standard Kolmogorov complexity challenge, except you get to choose your own fixed output. Given no input, output 55 fruits. You may choose any 5...

5 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 8mo ago by trichoplax‭

75%
+4 −0
Challenges Knight safe squares

Given a chess board with some knights on it, say how many squares are neither attacked by a knight nor containing a knight. Input An 8 by 8 grid where each square is either a knight or empty T...

3 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 8mo ago by Karl Knechtel‭

Question code-golf
75%
+4 −0
Meta Default Rules: Code Golf I/O

Command-line arguments may be used as input instead of stdin Languages/systems that support reading input from command-line arguments may use those as input instead of reading from stdin.

posted 2y ago by Lundin‭

Answer
75%
+4 −0
Sandbox Decode periodic decimal fractions [FINALIZED]

posted 2y ago by celtschk‭  ·  edited 11mo ago by trichoplax‭

75%
+4 −0
Challenges Collatz conjecture; Count the tries to reach $1$

JavaScript, 28 bytes f=n=>n-1&&-~f(n%2?n*3+1:n/2) Try it online!

posted 2y ago by Shaggy‭

Answer
75%
+4 −0
Challenges The Ludic Numbers

The Ludic Numbers are a sequence that pops up when you apply the sieve of eratosthenes to the natural numbers, completely removing the numbers every iteration. Here is how they are generated: The...

3 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by General Sebast1an‭

Question code-golf sequence
75%
+4 −0
Challenges Make $2 + 2 = 5$

Haskell, 13 bytes 2!2=5 x!y=x+y Try it online!

posted 2y ago by carmysilna‭

Answer