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
 
92%
+23 −0
Challenges "Hello, World!"

Introduction The classic "Hello, World" challenge. What more can I say? Rules Program takes no input. Program outputs Hello, World! with an optional trailing newline. No other output is accep...

58 answers  ·  posted 3y ago by anna328p‭  ·  last activity 1y ago by __blackjack__‭

89%
+15 −0
Meta Should challenges be worth 10 reputation?

The fourth highest voted CGCC Meta question asks that SE increases reputation for questions. This is now status completed across the entirety of the Stack Exchange network. However, I notice that i...

2 answers  ·  posted 3y ago by caird coinheringaahing‭  ·  last activity 2y ago by Monica Cellio‭

88%
+13 −0
Meta Should challenges be worth 10 reputation?

Yes Challenges are what we need to survive Some of our users answer almost every new challenge, but that's not enough to keep codidact alive if there are no new challenges now and then. Challeng...

posted 3y ago by Wezl‭

Answer
88%
+13 −0
Challenges Output 256 in many different ways

Challenge Write as many functions, programs, or snippets of code, that result in 256. Your score is the number of separate solutions submitted in an answer. The challenge? The characters used in ...

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

87%
+12 −0
Meta Do we require codegolf challenges include example code?

Don't require example code In general, I believe the decision should be on the challenge creator. Requiring it would be useless for certain types of challenges (kolmogorov-complexity or similar), ...

posted 3y ago by dzaima‭

Answer
87%
+12 −0
Meta Welcome to Code Golf!

Welcome to the Codidact site for Code Golf (and other coding challenges)! We're glad you're here and we're excited to see what you will build. This community is starting "from scratch", without i...

0 answers  ·  posted 3y ago by Monica Cellio‭  ·  edited 3y ago by Monica Cellio‭

87%
+12 −0
Challenges Evaluate a single variable polynomial equation

Challenge Given a list of n numbers and x, compute $a + bx^1 + cx^{2} + ... + zx^{n-1}$, where a is the first value in the list, b is the second, etc. n is at most 256 and at least 0. The input va...

20 answers  ·  posted 3y ago by moony‭  ·  last activity 2y ago by south‭

Question code-golf math
87%
+12 −0
Challenges Print the Great Numeric Pyramid

Print or return this exact text: 0 0 0 0 1 0 0 1 1 0 0 1 2 1 0 ...

5 answers  ·  posted 3y ago by Sisyphus‭  ·  last activity 3y ago by Marshall Lochbaum‭

87%
+12 −0
Challenges Partial Sums of Harmonic Series

Given an positive integer $n$, return the least positive integer $k$ such that the $k$th partial sum of the harmonic series is greater than or equal to $n$. For example, if $n = 2$, then $k = 4$, b...

11 answers  ·  posted 3y ago by Quintec‭  ·  last activity 1y ago by south‭

Question code-golf
87%
+12 −0
Meta How do we handle standardizing things?

Code golf, being about exploiting things, often brings about many questions about edge cases. Since we don't want each challenge to have to deal with all problems again and again, it makes sense to...

2 answers  ·  posted 3y ago by dzaima‭  ·  edited 1y ago by General Sebast1an‭

87%
+12 −0
Challenges Cumulative Counts

Challenge Given an array of numbers return the cumulative count of each item. This is the number of times an item has occurred so far. Examples [1,1,2,2,2,1,1,1,3,3] -> [1,2,1,2,3,3,4,5,1,2]...

19 answers  ·  posted 3y ago by rak1507‭  ·  last activity 9mo ago by WheatWizard‭

Question code-golf
86%
+11 −0
Challenges Merge two strings

Challenge Given two strings a and b, return the shortest string s so that s starts with a and ends with b. (Inspired by https://chat.stackexchange.com/transcript/message/57816868#57816868 ) Exam...

8 answers  ·  posted 3y ago by rak1507‭  ·  last activity 2y ago by radarek‭

Question code-golf
86%
+11 −0
Challenges Output 256 in many different ways

JavaScript, 11 solutions !``<<!``<<!``<<!``<<!``<<!``<<!``<<!``<<!`` TIO 2**2**2*2**2**2 TIO 55555555555555555555555555555555555555555555555...

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

Answer
86%
+11 −0
Challenges Output 256 in many different ways

Japt, 10 11 13 15 solutions 256 Works as you would expect. 8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8--8 Subtracting negative numbers. 4**4...

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

Answer
86%
+11 −0
Challenges Can you give me half?

Challenge idea taken from: Eliseo D'Annunzio Task Provide code that evaluates to 0.5 numerically, i.e. the output must be recognized by your chosen language as a numeric value (Number, float, dou...

23 answers  ·  posted 2y ago by Razetime‭  ·  last activity 8mo ago by RubenVerg‭

86%
+11 −0
Meta Default Rules: Code Golf I/O

Functions may take input via arguments and output via return value Functions may also use STDIN/STDOUT as they wish.

posted 2y ago by Quintec‭  ·  edited 2y ago by General Sebast1an‭

Answer
86%
+11 −0
Challenges Weave Strings Together

Given a list of strings(and optionally, their length) as input, weave the strings together. Intro Your goal is to mimic the WV operator in Pip. Take a list of strings and alternate between their ...

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

Question code-golf string
86%
+11 −0
Challenges Reverse an ASCII string

Your goal is to reverse an ascii string. Given a (optionally newline or null terminated) input, output your input in reverse order, optionally followed by a newline. Terminate afterward. Function...

32 answers  ·  posted 3y ago by moony‭  ·  last activity 8mo ago by qwr‭

Question code-golf
85%
+10 −0
Meta How can we grow this community?

Codidact's communities have a lot of great content that is helping people on the Internet. Our communities are small, though, and sustainable communities depend on having lots of active, engaged p...

2 answers  ·  posted 2y ago by Monica Cellio‭  ·  last activity 2y ago by Razetime‭

85%
+10 −0
Challenges Create an Alphabet Diamond

Challenge Output the following text: A ABA ABCBA ABCDCBA ABCDEDCBA ...

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

85%
+10 −0
Challenges Output 256 in many different ways

Raku, 18 solutions 256 ٢٥٦ ۲۵۶ ߂߅߆ ২৫৬ ᠒᠕᠖ 𑄸𑄻𑄼 4⁴ 0x100 ord Q`Ā` '~~~'~^'LKH' 888-88-88-88-88-88-88-88-8-8 99+99+9+9+9+9+9+9+?9+?9+?9+?9 ($_=3333333)&&m|(3)(3)(3)(3)*|&&...

posted 3y ago by Jo King‭  ·  last activity 3y ago by Jo King‭

Answer
85%
+10 −0
Meta Default Rules: Loopholes

Outsourcing the answer to unofficial conditions An example would be a program to print the Fibonacci numbers: instead of actually computing them, it queries an API and gives back its output. Anoth...

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

Answer
85%
+10 −0
Challenges It's Hip to be Square

Challenge A catalogue type challenge that simply asks: Given an integer n (where n>=0) as input return a truthy value if n is a perfect square or a falsey value if not. Rules You may take...

20 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by Zakk‭

85%
+10 −0
Challenges Are All Elements Equal?

Challenge Given a list of integers >= 0 , check if all of them are equal. Tests [1,1,1,1,1] -> true [0,1,1,6,7] -> false [1] -> true [] -> undefined(you do n...

16 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by torres‭

84%
+9 −0
Challenges Coat of Many Colours

Challenge Given a list of unique colour names as input, sort them in the order that they first appear in Joseph's Amazing Technicolour Dreamcoat. Example Input: green, blue, red, brown Outpu...

6 answers  ·  posted 2y ago by Shaggy‭  ·  last activity 2y ago by radarek‭