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
 
71%
+3 −0
Challenges Multiply complex numbers.

JavaScript (Node.js), 99 96 69 bytes s=>([a,b,c,d]=s.match(/-?\d+/g),a*c-b*d+(a=a*d+b*c,a<0?'':'+')+a+'i') Try it online! This regex is probably the best way to get the numbers. Also, f...

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

Answer
71%
+3 −0
Meta Leaderboards are live

Few QoL improvements can be made: Some trivial challenges(i.e. "Hello World!") get many, many answers, so the leaderboard should show a scrollbar beyond some point(after the first 10 submissions, ...

posted 4y ago by Razetime‭

Answer
71%
+3 −0
Challenges Single digit Roman numeral

Given a single character, which is a valid Roman numeral, output its value. Values There are 7 valid single character Roman numerals, with the following values: Character Value I...

6 answers  ·  posted 1y ago by trichoplax‭  ·  last activity 11mo ago by xrs‭

Question code-golf
71%
+3 −0
Challenges Borromean coprimes

Given 3 positive integers, indicate whether they are Borromean coprimes. Definition 3 positive integers are called Borromean coprimes if both of the following are true: Their greatest common d...

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

Question code-golf math
71%
+3 −0
Challenges Digit Sum Integer Sequence (working title)

Haskell, 56 bytes f a=a:f(a+g(read.pure<$>show a)) g a=minimum a+maximum a Try it online!

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
Challenges Repeat the characters

Haskell, 18 bytes (.replicate).(>>=) Try it online!

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
Challenges Repeat the characters

Ruby, 34 29 bytes ->s,n{s.chars.map{_1*n}*""} Try it online!

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

Answer
71%
+3 −0
Challenges Abbreviate everything

Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...

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

Question code-golf string
71%
+3 −0
Challenges Abbreviate everything

Python 3, 142 bytes def f(s): m=1;r="" for c in s.upper(): if'@'<c<'['or'-'==c:r+=c*m;m=0 if c in":; ":r+=c*(c!=' ');m=1 if c in".?!":r+=' ';m=1 return r Try it online!

posted 3y ago by celtschk‭

Answer
71%
+3 −0
Q&A Tips for golfing in Python

Reorder expressions in order to save whitespace Consider the following code: if c=='U':c='X' The space between if and c obviously cannot be removed, as that would merge them to the identifier ...

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

Answer
71%
+3 −0
Challenges Abbreviate everything

Haskell, 139 138 bytes import Data.Char f(a:b)|d a=toUpper a:f(dropWhile(\a->e a"-'"||d a)b)|e a":;"=a:c|e a".?!"=' ':c|0<1=c where c=f b;d=isLetter;e=elem f a=a Try it online!

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

Answer
71%
+3 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Haskell, 43 39 bytes f 1=0 f n=1+f([div n 2,n*3+1]!!mod n 2) Try it online!

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

Answer
71%
+3 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Python 3, 48 42 39 bytes Saved 6 bytes thanks to Hakerh400‭ in the comments Saved another 3 bytes thanks to user in the comments f=lambda n:n-1and-~f([n//2,3*n+1][n%2]) Try it online!

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

Answer
71%
+3 −0
Challenges Collatz conjecture; Count the tries to reach $1$

Sclipting, (UTF-16) 44 34 32 bytes 貶要❶갠剩❷隔❸增갰乘嗎終并長貶 Because comparing with 1 is expensive (requires copying and decrementing), we instead use a modified version of the Collatz sequence - namely...

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

Answer
71%
+3 −0
Sandbox The Ludic Numbers[FINALIZED]

posted 3y ago by Razetime‭  ·  edited 2y ago by trichoplax‭

71%
+3 −0
Challenges The Ludic Numbers

Haskell, 51 49 bytes -2 bytes thanks to Wheat Wizard 1:g[2..] g(a:b)=a:g[d|(c,d)<-zip[1..]b,c`mod`a>0] Try it online!

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

Answer
71%
+3 −0
Challenges Reverse your quine

Haskell, 78 bytes main=putStr$reverse$a++show a where a="main=putStr$reverse$a++show a where a=" Try it online!

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
Challenges Reverse your quine

JavaScript (Node.js), 60 bytes f=a=>console.log(`)(f;${[...f+``].reverse``.join``}=f`);f() Try it online!

posted 3y ago by Hakerh400‭

Answer
71%
+3 −0
71%
+3 −0
Challenges Convert integer to English

Given a non-negative integer up to $999\,999\,999$, write it in English. The input number can be in any form other than English (though you'll typically want to use the native integer type of your...

3 answers  ·  posted 3y ago by celtschk‭  ·  last activity 3y ago by Moshi‭

Question code-golf number string
71%
+3 −0
Sandbox Find good coalitions [FINALIZED]

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

71%
+3 −0
71%
+3 −0
Challenges Encode and decode floating point integers

Imagine you have only one byte (8 bits) to store a value, but need to store values from $0$ to $4032$. Impossible, until you are also told that an error of 1/64 of the exact value does not matter. ...

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

Question code-golf number
71%
+3 −0
Challenges Convert integer to English

Sclipting, (UTF-16) 454 406 bytes Yes. 塊匱❸곴김分倘標⓶❹演긆륩닆롩닶밎併鈉不終⓷곴김剩❶갾밈分倘⓷標⓷❺演긇끨닷녳눖멤併鈉⓶不終갾밈剩❶뉀分倘⓷標⓷❺演긆둵닦끲뉖밄併鈉⓶不終뉀剩⓶글會⓶倘❷長是긆굮뉂밀⓶終긇끨늗긠뉦뭵댢걦늖눠댶땸긇꽥덦녮긆녩뉶될닦땮뉐❷굀瀰是❶銅긂건덶녮融壹坼❸겠分掘덇밉⓸겠剩倘껐⓶⓹逆⓸終終긆뭮뉒건덶묠덆둲뉖넠뉦뭵댢걦늗뉥긇꽩...

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

Answer
71%
+3 −0
Challenges "Hello, World!"

C# (.NET Core), 60 bytes class a{static void Main(){Console.Write("Hello, World!");}} Try it online!

posted 3y ago by skatana‭

Answer