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
 
60%
+1 −0
Challenges Cumulative Counts

Python 3, 74 bytes def f(a): d={x:0 for x in a};r=[] for x in a:d[x]+=1;r+=[d[x]] return r Try it online!

posted 2y ago by celtschk‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Vyxal, 4 bytes KƛtO Try it Online! Explained KƛtO Kƛ # For each prefix of the input tO # How many times does the tail occur in the prefix?

posted 2y ago by lyxal‭

Answer
60%
+1 −0
Challenges Determine whether an integer is square-free

Myby, 12 5 bytes primf=primfd primf : prime factors = : equals primfd : unique prime factors Evaluated as a monadic fork in J (f y) g (h y). The test cases (retest...

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

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

Factor, 95 bytes USING: kernel ranges sequences ; IN: r : r ( n q -- n ) [ [1..b] [ ] ] dip map-reduce ; inline

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Factor, 122 bytes USING: kernel sequences sequences.windowed ; IN: c : c ( s -- s ) dup length [ dup last [ = ] curry count ] rolling-map ;

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Find n Niven Numbers

Factor, 147 bytes USING: kernel math math.text.utils sequences ; IN: n : n ( n -- s ) 0 swap [ [ 1 + dup dup 1 digit-groups sum mod 0 > ] loop dup ] replicate nip ;

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Make a frequency table (histogram)

Factor, 46 bytes USE: math.statistics IN: h ALIAS: h histogram

posted 2y ago by gifti‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Python 3, 70 bytes def f(a): d={};r=[] for x in a:d[x]=d.get(x,0)+1;r+=[d[x]] return r Try it online!

posted 2y ago by __blackjack__‭

Answer
60%
+1 −0
Challenges Find n Niven Numbers

Ruby, 56 bytes p *(1..).lazy.filter{_1%_1.digits.sum<1}.take(gets.to_i) Attempt This Online!

posted 2y ago by south‭

Answer
60%
+1 −0
Challenges Multiply complex numbers.

Sidef, 25 bytes {eval .split.join(" * ")} {eval .split.join(" * ")} { } # Create anonymous code block .split.join(" * ") # splits on whitespace and joins with "...

posted 2y ago by south‭

Answer
60%
+1 −0
Challenges Find n Niven Numbers

x86-64 machine code, 36 bytes 31 C0 8D 48 0A FF C0 50 99 89 17 48 F7 F1 01 17 99 85 C0 75 F6 58 50 F7 37 58 85 D2 75 E7 AB FF CE 75 E2 C3 Try it online! Following the standard calling conventi...

posted 2y ago by m90‭

Answer
60%
+1 −0
Challenges Multiply complex numbers.

Python 3, 63 bytes print(str(eval(f"({input().replace(' ',')*(')})")).strip("()")) Try it online! Similar to hyper-neutrino‭'s answer. Doesn't replace i by j and back, and uses f-string instea...

posted 2y ago by __blackjack__‭

Answer
60%
+1 −0
Challenges Looping counter

JavaScript, 25 bytes Could be 21 but calling the function like that feels like cheating. (f=s=>f(s+=8,print(s)))`` Try it online! 22 bytes Didn't want to post this as my main solution a...

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

Answer
60%
+1 −0
Challenges Determine whether an integer is square-free

Japt, 5 bytes k eUâ Try it

posted 2y ago by Shaggy‭

Answer
60%
+1 −0
Challenges Looping counter

Japt, 6 bytes ßOpP±Q Test it ßOpP±Q ß :Recursive call Op :Output with trailing newline P :Empty string, initially ± :Append Q :Quotation mark

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

Answer
60%
+1 −0
Meta Filtering the sandbox for ease of feedback

I'm leaving this answer here for any votes and discussion, but I no longer hold this opinion. I've posted a longer answer to explain why I've changed my mind After hearing about the filter devel...

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

Answer
60%
+1 −0
Challenges "Hello, World!"

Z80 Assembler, 50 bytes org 256 ld de,m ld c,9 jp 5 m:db"Hello, world!\r$" With assembler there's usually the problem which machine or operating system the program is for. I've chosen CP/M ...

posted 2y ago by __blackjack__‭

Answer
60%
+1 −0
60%
+1 −0
Challenges Presumptuous base conversion

JavaScript, 73 71 63 53 52 bytes Well, this ain't pretty at all! Will need to take another pass over it to try to improve upon it, maybe with recursion.Yeah, I was completely overthinking this one...

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

Answer
60%
+1 −0
Challenges Chequer checker

A chequer board (also spelt "checker board" in some places) is an 8 by 8 grid of squares alternating between 2 colours. Check whether a provided pattern could be a region of a chequer board. The c...

1 answer  ·  posted 2y ago by trichoplax‭  ·  edited 2y ago by trichoplax‭

Question code-golf string decision-problem
60%
+1 −0
Challenges "Hello, World!"

C (gcc), 46 bytes printf(char*);main(){printf("Hello, World!");} printf(char*);(14 bytes) is better than #include <stdio.h>\n(19 bytes)

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

Answer
60%
+1 −0
Challenges Looping counter

Fig, 5 bytes The actual score is $5\log_{256}(96)\approx$ 4.116 bytes. The leaderboard only likes ints in the header. (J,Q0 -1 char thanks to Seggan Try it online! Fractional byte lang creat...

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

Answer
60%
+1 −0
Challenges Can you give me half?

Fig, 2 unique, 2 total H! Try it online! Halves the negation of the empty string when no input is given.

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

Answer
60%
+1 −0
Challenges Rationalise recurring binary

Given a potentially recurring binary string, output the number it represents, as a fraction in lowest terms. The notation used in this challenge for recurring digits is non-standard. An r is used ...

0 answers  ·  posted 2y ago by trichoplax‭  ·  edited 10mo ago by trichoplax‭

Question code-golf math string parsing binary
60%
+1 −0
Meta Default minimum required precision and supported size for inputs

For challenges that require a input, what is the maximum a solution has to support, if not further specified by the challenge author? Lets say the input is a string, how long a string has to be ac...

0 answers  ·  posted 1y ago by H_H‭  ·  edited 6mo ago by trichoplax‭

Question default-rules discussion