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
 
75%
+4 −0
Challenges Caesar shift cipher

Introduction What is the Caesar shift cipher (ROT$n$)? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic i...

8 answers  ·  posted 3y ago by General Sebast1an‭  ·  last activity 4d ago by CrSb0001‭

Question code-golf string sequence encryption decryption
75%
+4 −0
Challenges Caesar shift cipher

JavaScript (Node.js), 67 60 bytes o=>r=>Buffer(o).map(c=>c%32<26&c>64?(c%32+r)%26+c-c%32:c)+'' Try it online! o=>r=> // Define a function taking o an...

posted 3y ago by emanresu A‭  ·  edited 3y ago by emanresu A‭

Answer
75%
+4 −0
Meta Is it good practice to change the names of variables in challenges?

Today, I have posted my first challenge in Code Golf. I have made the Job in 202 byte. Someone in comments, have changed variables name. e.g: From rot to o, and this renaming have saved 2 bytes. ...

1 answer  ·  posted 3y ago by Kevin M. Mansour‭  ·  edited 3y ago by Kevin M. Mansour‭

Question discussion
75%
+4 −0
Challenges Gamer Meme Creator

Ruby, 67 65 bytes -2 from Razetime ->s,a{[s.center(l=a.map(&:size).max),*a,"BOTTOM TEXT".center(l)]} Takes the art and outputs as a list of lines. Try it online!

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

Answer
75%
+4 −0
Meta Answering challenges with languages newer than the challenge

Somewhere Else, there was a long-standing rule that to answer a challenge, you couldn't use languages, language versions, or features that were created or introduced after the challenge was posted....

2 answers  ·  posted 3y ago by snail_‭  ·  last activity 3y ago by user‭

Question discussion
75%
+4 −0
Meta Answering challenges with languages newer than the challenge

Answering with languages newer than the challenge should absolutely be allowed Most of the time, when a language is newer than a challenge, it's just a coincidence. By not allowing people to answe...

posted 3y ago by user‭

Answer
75%
+4 −0
Challenges It's Hip to be Square

Haskell, 24 bytes Probably the optimal solution. Credits go to nimi from PPCG. f n=elem n$map(^2)[0..n] Try it online! My original solution, 25 bytes f a=any((==a).(^2))[0..a] Try it ...

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

Answer
75%
+4 −0
Challenges It's Hip to be Square

APL (Dyalog Extended), 3 bytes √∊… Try it online! Is the square root in the range?

posted 3y ago by Adám‭  ·  edited 3y ago by Adám‭

Answer
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 4y 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 4y ago by user‭  ·  edited 4y 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 4y ago by user‭  ·  edited 4y 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 4y ago by Aaron Miller‭

Answer
75%
+4 −0
Challenges Weave Strings Together

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

posted 4y ago by xigoi‭  ·  edited 4y 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 4y 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 4y 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 4y ago by Moshi‭  ·  edited 4y 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 4y 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 4y ago by hyper-neutrino‭  ·  edited 4y ago by hyper-neutrino‭

Answer
75%
+4 −0
Challenges Evaluate a single variable polynomial equation

Ruby, 38 bytes Simple map and sum over the coefficients. No TIO link, this uses numbered lambda parameters which require Ruby 2.7. ->l,x{l.each_with_index.sum{_1*x**_2}}

posted 4y ago by snail_‭

Answer
75%
+4 −0
Challenges Calculate a person's age

Challenge Given a date with day, month and year, calculate how old a person born on that day would be today. Input can be in any reasonable format(params, array, date object). Input will never b...

0 answers  ·  posted 4y ago by Razetime‭

Question code-golf date
75%
+4 −0
Challenges Generate Lewis Caroll's Jabberwocky

The task is to generate the text of Lewis Caroll's Jabberwocky. The text, quoted from Wikipedia, is as follows (I've replaced a non-ASCII character with ASCII, otherwise it's direct copy&paste...

4 answers  ·  posted 4y ago by celtschk‭  ·  last activity 3y ago by General Sebast1an‭

Question code-golf kolmogorov-complexity
75%
+4 −0
Challenges Reverse an ASCII string

Shakespeare Programming Language, 184 bytes ,.Ajax,.Puck,.Act I:.Scene I:.[Enter Ajax and Puck]Scene V:.Puck:Open mind!Be you worse zero?If soLet usScene L!Remember you!Let usScene V!Scene L:.Puck...

posted 4y ago by Corsaka‭

Answer
75%
+4 −0
Challenges Truthify an array

C (gcc), 100 bytes i,j;f(x,y,p)int*p;{puts("[");for(;i<x;i++)for(j=0;j<y;j++)*p++&&printf("[%d,%d],",i,j);puts("\b]");} Try it online! Note that TIO console doesn't handle back...

posted 4y ago by Lundin‭  ·  edited 4y ago by Lundin‭

Answer
75%
+4 −0
Challenges 1, 2, Fizz, 4, Buzz!

RoadLang, 340 bytes wagwan my slime x is 0 rip dat bong till x bigger den 99 n dat x is x n 1 ayy bossman (x leftova 15) be 0 init bruv man say"FizzBuzz" yeah init bruv ayy bossman (x lef...

posted 4y ago by Razetime‭

Answer
75%
+4 −0
Meta Should [code-golf-tips] be replaced with [tips] + [code-golf]?

Instead of the code-golf-tips tag, could we tag "Tips for golfing" questions with tips and code-golf instead? They can still be searched for, so I don't see a reason to make a special tag to repres...

1 answer  ·  posted 3y ago by user‭  ·  edited 3y ago by General Sebast1an‭

Question discussion tags