Share Your Experience: Take the 2024 Developer Survey

# Tag Info

### Chicken McNugget Numbers

Python, 27 bytes lambda n:0x82492cb6dbf>>n&1 Try it online!
• 39.7k

### Chicken McNugget Numbers

Python 3, 24 bytes lambda n:0<=n--n%3*20!=3 Try it online! Explanation With 6 and 9 ...
• 49.7k

### 11 = (1+2+3+4+5) - (1+2+3) + (6) - (4)

Mathematica, 79 bytes Min[2#/(d=Divisors@#~Cases~_?OddQ)+d]-2⌊(2#)^.5+.5⌋+⌈Sqrt[8#+1]~Mod~1⌉& Explanation I couldn't be bothered to implement the algorithm ...
• 197k
Accepted

### Yo boy, must it sum

Brachylog, 7 bytes ~+ℕᵐ.↔ᵐ Try it online! Surprisingly not that slow. Explanation ...
• 38.7k

### A penny saved is a penny

Haskell, 37 34 bytes s#l@(c:d)|s>=c=(s-c)#l+s#d s#_=0^s Usage example: 26 # [1,5,10,25] -> ...
• 35.8k

### Sum of five cubes

Brachylog, 18 bytes ∧5~lLȧᵐ≥₁∧L^₃ᵐ.+?∧ Try it online! Explanation We basically describe the problem, with the additional constraint that we want the output ...
• 38.7k

### A penny saved is a penny

Mathematica, 35 22 bytes Thanks to miles for suggesting FrobeniusSolve and saving 13 bytes. Length@*FrobeniusSolve Evaluates ...
• 197k

### Sum of five cubes

Brachylog, 11 bytes Thanks Fatalize for saving one byte ~+l₅≥₁.√₃ᵐ∧ Try it online! Firstly ~+ enforces that the output (<...
• 11.6k

### Number of coins needed to make change

JavaScript (ES7),  36  35 bytes Similar to other answers. Using a Black Magic formula instead of a lookup table. f=n=>n&&(n%10)**29%3571%4+f(n/10|0) ...
• 193k

### Number of coins needed to make change

Husk, 11 9 8 bytes Edit: -1 byte thanks to caird coinheringaahing ṁo⌈½ṁB5d Try it online! ...
• 34.8k
Accepted

### A penny saved is a penny

Jelly (fork), 2 bytes æf This relies on a branch of Jelly where I was working on implementing Frobenius solve atoms so unfortunately you cannot try it online. ...
• 16.9k
Accepted

### How many partitions do I have?

Pyth, 3 bytes l./ Try it here! or Try a test Suite. The answer took much longer to format than writing the code itself :P. How? Pyth is the right tool for the job....
• 42.4k