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
 
81%
+7 −0
Challenges Determine whether an integer is square-free

An integer is called square-free if it is not a multiple of a perfect square other than 1. For example, 42 is square-free, but 44 is not because it is a multiple of the perfect square 4 = 2². Your...

13 answers  ·  posted 3y ago by celtschk‭  ·  last activity 2y ago by Shaggy‭

81%
+7 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Background Check out this video on the Collatz conjecture, also known as A006577. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is odd...

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

Question code-golf math number
81%
+7 −0
Challenges Efficient censorship

You are a low-level censor working for the Ministry of Media Accuracy. Part of your job is to make sure that certain words don't appear in publications. Every morning you get a fresh stack of next...

4 answers  ·  posted 1y ago by WheatWizard‭  ·  last activity 1y ago by Shaggy‭

Question code-golf string
81%
+7 −0
Challenges Find n Niven Numbers

Challenge A Niven number is a positive integer which is divisible by the sum of its digits. For example, 81 -> 8+1=9 -> 81%9=0. Your task is to find the first n Niven numbers, given n. Te...

7 answers  ·  posted 2y ago by Razetime‭  ·  last activity 2y ago by Shaggy‭

81%
+7 −0
Challenges In The Jailhouse Now

Challenge Given an integer n>=4 as input create an ASCII art "prison door"* measuring n-1 characters wide and n characters high, using the symbols from the example below. Example ╔╦╗ ╠╬╣ ...

6 answers  ·  posted 3y ago by Shaggy‭  ·  last activity 3y ago by snail_‭

Question code-golf ascii-art
81%
+7 −0
Challenges Roll n fair dice

Challenge This is a simple randomness challenge: Given a non-negative integer $n$, and positive integer $m$, simulate rolling and summing the results of $n$ fair dice, each of which have $m$ sides...

10 answers  ·  posted 3y ago by Moshi‭  ·  last activity 1y ago by RubenVerg‭

Question code-golf random
81%
+7 −0
Challenges Reverse an ASCII string

Brain-Flak, 12 bytes {({}<>)<>}<> Try it online! # (Implicitly) Read characters from STDIN and place them all on the active stack # While the top of the active stack is no...

posted 4y ago by DJMcMayhem‭

Answer
81%
+7 −0
Challenges Output 256 in many different ways

C, 8 solutions Standard C, no extensions. 1 solution snippet per line: "llll"[3]^33^333 4*4*4*4 5555-555-555-555-555-555-555-555-555-555-55-55-55-55-55-5-5-5-7-7 6666/26 (int){8<...

posted 4y ago by Lundin‭

Answer
81%
+7 −0
Challenges Truthify an array

Jelly has an atom called untruth, which when given indices, creates an array with 1s at those places: [2,4] → [0,1,0,1]. You are required to perform the inverse of this. Given a 2D boolean array, ...

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

81%
+7 −0
Challenges Truthify an array

JavaScript (Node.js), 74 70 bytes Works for any number of dimensions. f=(a,z=[])=>a.map?.((b,c)=>z.push(...f(b).map(a=>[c,...a])))?z:a?[z]:z Try it online! (TIO uses an old version ...

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

Answer
81%
+7 −0
Meta Default Rules: Code Golf I/O

Programs may take input from prompts from the GUI For Mathematica, JS, Matlab, et. al. this is the closest thing they have to STDIN.

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Loopholes

Using the lack of features in a language to trivialize the problem For example, in a challenge which requires your program to check if it is connected to the internet, using Brainfuck to always pr...

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Code Golf I/O

Functions may take multiple arguments with currying For some languages like Haskell this is almost a necessity, as only one-argument functions exist and multi-argument functions are implemented wi...

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
Meta Default Rules: Loopholes

Interpreting the challenge too literally If the challenge asks that you print the nth prime given input n, a program printing the nth prime given input n isn't allowed.

posted 3y ago by AndrewTheCodegolfer‭

Answer
81%
+7 −0
81%
+7 −0
Meta Default Rules: Extensions

The answer header must specify the minimum implementation & environment required If there are multiple implementations of a language and an answer depends on features of one, it must be specif...

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

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

Task I often need to find the factorial of a number or the sum of all numbers up to a number when cheating on math tests. To help me with this, your task is to write $F$, a generalized version of ...

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

81%
+7 −0
Challenges Word Set Square

Challenge Given a string, e.g. Hello, do the following: Mirror it: Hello -> HelloolleH and create a right triangle using it as the sides: H ee l l l l o...

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

Question code-golf ascii-art
81%
+7 −0
Challenges Is it a near-anagram?

APL (Dyalog Extended), 18 bytes Anonymous tacit prefix function taking a list of two strings as argument. 2=1⊥(≠⌿∊≢⍤⊢⌸⍤,⍤1↑) Try it online! (…) apply the following tacit function to the arg...

posted 3y ago by Adám‭

Answer
81%
+7 −0
Challenges Make my number a set

Natural to set (set meaning an unordered collection with no duplicates, though answers may use and output lists instead) Recently I was brainstorming what a language with only (arbitrarily nested...

10 answers  ·  posted 3y ago by Wezl‭  ·  last activity 3y ago by radarek‭

Question code-golf number
81%
+7 −0
Challenges Backspace an array

Challenge Given an array consisting of positive integers and 0s, return it with 0s acting like backspaces. Leading backspaces do nothing, and more backspaces than elements also does nothing. Cre...

6 answers  ·  posted 3y ago by rak1507‭  ·  last activity 3y ago by Shaggy‭

Question code-golf
81%
+7 −0
Challenges Evaluation order of an APL n-train

Description APL trains are a series of functions, that get applied to an argument in this way: (f g) x = f g x (f g h) x = (f x) g (h x) (a b c d e f) x = (a (b c (d e f))) x = a (b x) c (d x) ...

7 answers  ·  posted 3y ago by rak1507‭  ·  last activity 3y ago by Shaggy‭

Question code-golf
81%
+7 −0
Challenges Word Count Tool

In Google Docs, the word count tool looks like this: Pages would not make sense, but your goal is to implement every other count. Definitions Words are strings of text separated by any amount ...

9 answers  ·  posted 3y ago by Quintec‭  ·  last activity 2y ago by torres‭

Question code-golf string
81%
+7 −0
Meta Should challenges be worth 10 reputation?

status-completed I've just converted posts in the Challenges category over to a new Challenge post type that awards more reputation per upvote, starting now. Retroactive reputation changes are bei...

posted 3y ago by ArtOfCode‭  ·  edited 3y ago by Monica Cellio‭

Answer
81%
+7 −0
Challenges Evens or Odds - you know this one

Get ready for a comparatively dry question - this is intended to be one of the "the"s of the code-golfing dictionary. Create a program which inputs a base 10 non-negative whole number (without lea...

16 answers  ·  posted 3y ago by AndrewTheCodegolfer‭  ·  last activity 2y ago by Olin Lathrop‭