The 2024 Developer Survey results are live! See the results

# Tag Info

### N-dimensional N^N array filled with N

Python, 32 bytes lambda n:eval('['*n+'n'+']*n'*n) Try it online! Makes a string like "[[[n]*n]*n]*n" with ...
• 146k

### Print all integers

Haskell, 19 bytes do n<-[1..];[1-n,n] Produces the infinite list [0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7... Haskell allows ...
• 146k

### Output the sign

Retina, 9 bytes [1-9].* 1 Try it online! Replaces a non-zero digit and everything after it with 1. This leaves a potential ...
• 197k

### As Easy as One-Two-Three

Python, 24 bytes range(123,790,111).count An anonymous function that outputs 0 or 1. It creates the list ...
• 146k

### Output the sign

C (GCC), 24 23 22 18 bytes Thanks to @aross and @Steadybox for saving a byte! f(n){n=!!n|n>>31;} Not guaranteed to work on all systems or compilers, works on ...
• 8,723

### Moving modest minimum

Python 2, 41 bytes lambda l:[sorted(l)[x==min(l)]for x in l] Try it online! For each element x we check whether ...
• 146k

### How long is my number?

Taxi, 1118 bytes ...
• 9,439

### Output the missing integer

Python 2, 18 16 bytes +beauty thanks to @Sarge Borsch 99066**2.strip Try it online! 99066**2 is just a shorter way to ...
• 18.4k

### What are the five most powerful characters in your language?

Python3, 21 27 values Characters: 3479% Unique numbers: [1,2,3,4,5,6,7,8,9,11,12,19,20,21,24,29,34,35,36,37,39,43,46,47,49,73,74]...
• 3,762

### Powerprogramming: O(1^N), O(N^1), O(2^N), O(N^2) all in one

Python 3, 102 bytes try:l=eval(input());k=1#)]0[*k**l(tnirp except:k=2#2=k:tpecxe print(k**l*[0])#1=k;))(tupni(lave=l:yrt Try it online! This is of O(1^n), ...
• 49.9k

### iHateOddNumbers

Python 2, 16 bytes lambda n:n<<n%-2 Try it online! The expression n%-2 equals 0 for even ...
• 146k

### Output the sign

Mathematica, 4 bytes Clip How about not using the built-in Sign and still scoring 4 bytes? ;) ...
• 197k

### Is this number an exact power of -2: (Very) Hard Mode

C++, 15 operations I have no idea why while loops are allowed as they destroy the whole challenge. Here is an answer without any: ...
• 39.1k

### Is this a triangle?

Python, 24 bytes lambda l:sum(l)>max(l)*2 Try it online! Checks if a+b+c > max(a,b,c)*2. If, say, ...
• 146k

### As Easy as One-Two-Three

Python, 24 bytes lambda n:n%111==12<n<900 Just a lot of condition chaining.
• 61.9k

### Float 754 to Hamming

x86_64 machine language (Linux), 16 bytes ...
• 7,625

### A Portuguese sequence of integers

Wolfram Language (Mathematica), 42 bytes Of course there is a built-in for this... And as @Charlie mentioned we can golf "Portuguese" to ...
• 24.9k

### What are the five most powerful characters in your language?

Python, 18 numbers 237#- Produces as valid results: 1, 2, 3, 4, 5, 7, 16, 23, 24, 25, 27, 32, 35, 37, 69, 71, 72, 73 EDIT: ...
• 12.7k

### Output the sign

COW, 225 213 201 bytes ...
• 2,897

• 197k

### Oddly Even, Positively Negative

Python 2, 23 bytes lambda n:~n/2+n%2*(n|2) Odd inputs give roughly n/2, even ones roughly ...
• 146k

### Print all integers

Cubix, 14 12 bytes .(.\OSo;?.>~ Test it online! You can now adjust the speed if you want it to run faster or slower. How it works The first thing the ...
• 50.1k
Accepted

### Inverse Deltas of an Array

Jelly, 7 3 bytes ḤḢ_ Try it online! Background The deltas of (a, b, c, d) are b - a, c - b, and d - c. Cumulatively reducing (a, b - a, c - b, d - c) by ...
• 210k
Python 3, 30 bytes lambda l:sum(n**3&6for n in l) Try it online! (test cases shamelessly borrowed from xnor's answer) How? Given $1\le n\le6$, the ...