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
 
60%
+1 −0
Challenges How many odd digits?

Vyxal, 4 bytes Expects a string. O2%∑ Try it here! Explanation O2%∑ O ord 2% modulo 2 ∑ sum

posted 2mo ago by Europe2048‭

Answer
60%
+1 −0
Meta Preferred length limit for Code Golf posts

65,535 The database field can already handle up to 65,535 (216 - 1) characters. Same for all post types and categories I don't see a need for different limits for questions and answers, or for d...

posted 2mo ago by trichoplax‭

Answer
60%
+1 −0
Challenges Fibonacci without consecutive digits

Haskell, 110 bytes c[]=1>0 c(a:b:_)|abs(a-b)==1=1<0 c(_:b)=c b f=0:1:zipWith(+)f(tail f) h=[g|g<-f,c.map fromEnum.show$g] r=(h!!) Try it online!

posted 2mo ago by Andrew Ray‭

Answer
60%
+1 −0
Challenges How many odd digits?

JavaScript, 25 bytes Input as an array of digits a=>a.map(x=>t+=x%2,t=0)|t Try it online! 26 bytes With input as a string (or an array of digit strings). f=([d,...a])=>d?d%2+f(a):0...

posted 3mo ago by Shaggy‭  ·  edited 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges How many odd digits?

Japt -mx, 2 1 byte u Try it u :Implicit map of input array u :Modulo 2 :Implicit output of sum of resulting array

posted 3mo ago by Shaggy‭  ·  edited 1mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges How many odd digits?

Python, 37 27 bytes First, with input as an integer: lambda i:sum(ord(x)&1for x in str(i)) This converts the number to string (in the base-10 default) and processes each character. It expl...

posted 3mo ago by Karl Knechtel‭  ·  edited 3mo ago by Karl Knechtel‭

Answer
60%
+1 −0
Challenges How many odd digits?

Given a positive integer, count its odd digits. Input An integer from 1 to 999,999,999, inclusive, in any of the following formats: A number (such as an integer or floating point number), li...

6 answers  ·  posted 3mo ago by trichoplax‭  ·  last activity 1mo ago by Shaggy‭

Question code-golf number
60%
+1 −0
Challenges Hex ​​​detector

Given an integer from 1 to 1000, indicate whether it is a centered hexagonal number[1] (also known as a hex number). What is a hex number? The hex numbers can be visualised as follows: On a he...

4 answers  ·  posted 5mo ago by trichoplax‭  ·  last activity 3mo ago by trichoplax‭

Question code-golf math number
60%
+1 −0
Challenges Most isolated of 3 points

Given 3 points, output one that is separated from its nearest neighbour by the largest distance. Input 3 distinct points (that is, no 2 points are in the same position). Each point is a pair o...

0 answers  ·  posted 5mo ago by trichoplax‭  ·  edited 5mo ago by trichoplax‭

Question code-golf math number
60%
+1 −0
Sandbox Most isolated of 3 points [FINALIZED]

posted 5mo ago by trichoplax‭  ·  edited 5mo ago by trichoplax‭

60%
+1 −0
Challenges The 50 substrings that validate any string of Roman numerals

Haskell, 271 bytes import Data.Char import Data.List n=" IVXLCDM" r x=maximum[if(s`isInfixOf`x)then s else"A"|s<-words$concat$map(\x->(n!!div x 8):[(n!!(x-8*(div x 8)))])$map(\x->ord...

posted 7mo ago by Arpad Horvath‭

Answer
60%
+1 −0
Challenges Hex ​​​detector

Japt -d, 8 bytes °*U*3¥NÉ Try it 9 bytes NøT±1wU*6 Try it

posted 5mo ago by Shaggy‭  ·  edited 3mo ago by Shaggy‭

Answer
60%
+1 −0
Challenges The 50 substrings that validate any string of Roman numerals

Bash, 205 bytes for s in C{C{CC,D,M},DC,MC} {CM,DC,D}{D,M} I{C,D,I{II,V,X},L,M,VI,X{C,I,L,V,X}} L{C,D,L,M,XC,XL} MMMM V{C,D,IV,IX,L,M,V,X} X{C{C,D,L,M,X},D,LX,M,X{C,L,XX}} do echo $1|grep -q $s...

posted 5mo ago by celtschk‭

Answer
60%
+1 −0
Meta Short ​​​titles

A limit of 1 character for Challenges and Sandbox Now that Monica has pointed out that adjusting the minimum is already possible per category, I propose that we leave the minimum at 15 characters ...

posted 5mo ago by trichoplax‭  ·  edited 5mo ago by trichoplax‭

Answer
60%
+1 −0
Challenges Hex ​​​detector

Dyalog APL, 10 bytes ⊢∊1+\⍤,6×⍳ Port of lyxal's Vyxal answer. Explanation ⊢∊1+\⍤,6×⍳­⁡​‎‎⁡⁠⁡‏⁠‎⁡⁠⁢‏‏​⁡⁠⁡‌⁢​‎⁠⁠‎⁡⁠⁤‏⁠‎⁡⁠⁢⁡‏⁠‎⁡⁠⁢⁢‏⁠‏​⁡⁠⁡‌⁣​‎‎⁡⁠⁣‏⁠‎⁡⁠⁢⁣‏‏​⁡⁠⁡‌...

posted 5mo ago by RubenVerg‭

Answer
60%
+1 −0
Meta How do we handle standardizing things?

Something I would like to see here are explicit and specific constraints on how submitted solutions are expected to accept the challenge input and output their solutions (if output is the goal). F...

posted 6mo ago by Hackysack‭  ·  edited 6mo ago by Hackysack‭

Answer
60%
+1 −0
Challenges Make $2 + 2 = 5$

AWK, 28 26 21 bytes $0=$1~2&&$2~2?5:$1+$2 Try it online!

posted 6mo ago by xrs‭  ·  edited 1d ago by xrs‭

Answer
60%
+1 −0
Challenges The 50 substrings that validate any string of Roman numerals

Rust, 258 254 bytes Saved four bytes thanks to trichoplax. fn v(s:&str)->&str{for b in "CCCC CCD CCM CDC CMC CMD CMM DCD DCM DD DM IC ID IIII IIV IIX IL IM IVI I...

posted 5mo ago by Sylvester‭  ·  edited 5mo ago by Sylvester‭

Answer
60%
+1 −0
Challenges Single digit Roman numeral

AWK, 80 bytes {split("I V X L C D M 1 5 10 50 100 500 1000",d);for(;d[++i]!=$1;);print d[i+7]} Try it online! A quick map function. 'split' breaks the string into array elements. Find the stri...

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

Answer
60%
+1 −0
Challenges Looping counter

K (oK), 9 bytes {x#0}'!10 Try it online! !10 / pass range your arbitrary number .' / treat those as a list, and evaluate each separately { } / main function...

posted 6mo ago by xrs‭  ·  edited 3mo ago by xrs‭

Answer
60%
+1 −0
Challenges Digit Sum Integer Sequence (working title)

AWK, 82 bytes {split($1,d,"");i=a=d[1];for(x in d){d[x]>a?a=d[x]:0;d[x]<i?i=d[x]:0}print a+i+$1} Try it online! Just pass your input, e.g.: echo "123" | awk '...'

posted 6mo ago by xrs‭  ·  edited 6mo ago by xrs‭

Answer
60%
+1 −0
Challenges Create a range grid

Python 3, 49 bytes lambda m,n:[[*range(n*_,n*_+n)]for _ in range(m)] Try it online!

posted 2y ago by orthoplex‭

Answer
60%
+1 −0
Challenges Create a range grid

Python 2, 46 bytes lambda m,n:[range(n*_,n*_+n)for _ in range(m)] Try it online!

posted 2y ago by orthoplex‭

Answer
60%
+1 −0
Challenges Create a range grid

C (gcc), 59 bytes i;f(m,n){while(i<m*n){putchar(i%n?32:13);putchar(48+i++);}} Attempt This Online! m is the number of rows. n is the number of columns.

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

Answer
60%
+1 −0
Challenges Create a range grid

BQN (CBQN), 10 bytes Anonymous function that takes m on the left and n on the right. {𝕨‿𝕩⥊↕𝕨×𝕩} ↕𝕨×𝕩 # list of range [0,m*n) 𝕨‿𝕩⥊ # reshape list to m*n Try it here!

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

Answer