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 Solve Goldbach's Conjecture

APL (Dyalog Unicode), 32 bytes (SBCS) {⊃(⊢(/⍨)⍵=+/¨),∘.,⍨(⊢~∘.×)⍨1↓⍳⍵} Try it online! {⊃(⊢(/⍨)⍵=+/¨),∘.,⍨(⊢~∘.×)⍨1↓⍳⍵} ⍳⍵ ⍝ Range from 1 to n ...

posted 3y ago by user‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Jelly, 7 bytes =þ`ÄŒDḢ Try it online!

posted 3y ago by hyper-neutrino‭

Answer
60%
+1 −0
Challenges Cumulative Counts

Scala 3, 50 44 bytes ? => ?.indices zip?map(?take _+1 count _.==) Try it in Scastie! This is an annoying, stupid approach. The more elegant one using inits was much longer (x=>x.inits.to...

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

Answer
60%
+1 −0
Challenges Cumulative Counts

Husk, 4 bytes Sz#ḣ Try it online! Explanation Sz#ḣ Sz zip the input ḣ with its prefixes # using the count function

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Beaver Code Decryption

Husk, 8 bytes ΣTm?I₀ε½ Try it online! It's jelly but reversed. 1 byte lesser due to a single byte halve.

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

Answer
60%
+1 −0
Challenges Beaver Code Decryption

APL(Dyalog Extended), 32 bytes SBCS {1=≢⍵:⍵⋄0~⍨,⍉↑∇¨↓2 ¯1⍴⍵,0/⍨2|≢⍵} Try it on APLgolf! A dfn submission which takes a string as input. I thought this would be much shorter, but it's only a s...

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Really Cool Numbers

APL (Dyalog Unicode), 30 29 bytes Saved 1 byte thanks to Razetime (could've saved 1 more with a tradfn, but I didn't feel like it) {∧/(0=1|+/÷≢)¨1↓¨g¨(g←∪⊢∨⍳)⍵} Try it online! This answer w...

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

Answer
60%
+1 −0
Challenges Really Cool Numbers

Husk, 9 bytes ΛöS=⌊AhḊḊ Try it online! or Verify all testcases returns number of divisors + 1 for true and 0 for false.

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

Answer
60%
+1 −0
Challenges Print the Great Numeric Pyramid

BQN, 33 bytesSBCS >(⌽(⊑¨55↑+˜⊸+⊔'0'+⌽⊸⌊⊸⌊)¨˜1↓↑)↕28 Run online! Minimum of barycentric coordinates placed according to a skew transformation on two of them. So, the min(i,j,27-i-j) thing pr...

posted 3y ago by Marshall Lochbaum‭

Answer
60%
+1 −0
Challenges Backspace an array

Python 3.8 (pre-release), 62 bytes f=lambda x,a=[]:f(x[1:],a+[x[0]]if x[0]else a[:-1])if x else a Try it online! -11 bytes thanks to user

posted 3y ago by hyper-neutrino‭  ·  edited 3y ago by hyper-neutrino‭

Answer
60%
+1 −0
Challenges Backspace an array

JavaScript (Node.js), 41 40 bytes Saved 1 byte thanks to Shaggy x=>x.map(e=>e?a.push(e):a.pop(),a=[])&&a Try it online! x => //x is the input x.map(e=> //For every...

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

Answer
60%
+1 −0
Challenges Shuffle a subset of a list

APL(Dyalog Unicode), 13 bytes SBCS {⍵[?⍨≢⍵]}@⎕⊢⎕ Try it on APLgolf! A tradfn submission which takes both lists on STDIN, second input is 1-indexed.

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Challenges Shuffle a subset of a list

Japt, 17 bytes ô@VøYÃíUgV öx)c f Try it Japt, 17 bytes ô@VøYÃíUgV öx)c f Try it ô@VøYÃíUgV öx)c f :Implicit input of arrays U=integers & V=indices ô :Split U ...

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

Answer
60%
+1 −0
Challenges A number adder, not a death adder

Python 3, 58 39 bytes P1: print(f"print(int(input())+{input()})") Try it online! P2 (given I inputted 10, 30 22 bytes): print(int(input())+10) Try it online!

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

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

Forth (gforth), 16 bytes ." Hello, World! Try it online!

posted 3y ago by nizish‭

Answer
60%
+1 −0
Challenges Add two negabinary integers

Jelly, 6 bytes ḅSbɗ-2 Try it online! Takes input and output as a pair of lists of digits. The Footer converts to and from. Jelly's generalised base conversion works for all integer bases, and...

posted 3y ago by caird coinheringaahing‭  ·  edited 3y ago by caird coinheringaahing‭

Answer
60%
+1 −0
Challenges Add two negabinary integers

Japt, 8 bytes Input as an array of negabinary digit arrays, output as a negabinary digit array. xì2n)ì2n Try it or run all test cases (headers & footers convert to & from digit arrays)...

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

Answer
60%
+1 −0
Challenges The Pell Numbers

Japt, 11 9 bytes Outputs the first n terms. Change the h to g to get the nth 0-indexed term. ÈÑ+ZÔÅÎ}h Try it ÈÑ+ZÔÅÎ}h :Implicit input of integer U È :Function taking an int...

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

Answer
60%
+1 −0
Meta Leaderboard bug: recognizing inline code blocks

There's a small problem with the leaderboard: It seems to be recognizing the first <code> block in the answer rather than the first <pre><code> block in the answer. The byte co...

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

60%
+1 −0
Challenges Multiply complex numbers.

Ruby, 35 bytes ->a{a.split.map{eval _1}.reduce :*} Try it online! Right tool for the job, I suppose. uses ruby 2.7+ features, so tio link will look different.

posted 3y ago by Razetime‭

Answer
60%
+1 −0
Meta Default Rules: Code Golf I/O

Image output may be a pixel shader A pixel shader inputs x,y coordinates of a pixel and prints the color of a pixel (scalar for grayscale, tuple for full color, bool for binary...). Relevant for S...

posted 3y ago by AndrewTheCodegolfer‭

Answer
60%
+1 −0
Challenges Cumulative Counts

JavaScript (Node.js), 34 29 26 bytes -5 bytes thanks to Shaggy's suggestion on a similar challenge -3 bytes again thanks to Shaggy! a=>a.map(d=v=>d[v]=-~d[v]) Try it online!

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

Answer
60%
+1 −0
Challenges 1, 2, Fizz, 4, Buzz!

Sclipting, (UTF-16) 62 bytes 감 뉀上標❷갰剩虛끦땺뎠嗎❸걐剩虛뀧녺뎠嗎併梴是⓶終丟終并겠會

posted 3y ago by Moshi‭

Answer
60%
+1 −0
Challenges Caesar shift cipher

C (clang), 161 bytes i,j,k;main(){char *s;scanf("%i%[^\n]%*c",&i,s);for(j=0;j<strlen(s);j++){if(isalpha(s[j])){for(k=0;k<i;k++){if(s[j]==90||s[j]==122){s[j]-=26;}s[j]+=1;}}}puts(s);} ...

posted 3y ago by General Sebast1an‭  ·  edited 3y ago by General Sebast1an‭

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

Kotlin, 34 bytes fun main(){print("Hello, World!")} Try it online!

posted 3y ago by Kevin M. Mansour‭

Answer