Skip to main content

New answers tagged

1 vote

List prime-factorized natural numbers up to N in ascending order

Rust Rust port of @Keith Randall's C++ code. ...
138 Aspen's user avatar
  • 6,617
2 votes

The smallest number with a given water capacity

C++ (gcc), 273 237 208 207 205 bytes ...
ioveri's user avatar
  • 141
0 votes

The smallest number with a given water capacity

Japt, 25 23 bytes Gets slower the larger the expected output. @¶Xk ü Ë×õÃÕcÈð änÃxÉ}a Try it or verify the first 30 values in the sequence ...
Shaggy's user avatar
  • 43.5k
4 votes

The smallest number with a given water capacity

05AB1E, 15 bytes ∞.ΔÒγPLζðδÚ˜ð¢Q Try it online or verify four test cases. (It's very slow, so it'll time out for \$n=3\$ or \$n\geq6\$..) Explanation: ...
Kevin Cruijssen's user avatar
3 votes

The smallest number with a given water capacity

Jelly, 18 bytes ÆF*/€Rz0t€0Fċ0⁼ð1# A monadic Link that accepts a positive integer and yields a singleton list containing the first number with that capacity ...or ...
Jonathan Allan's user avatar
1 vote

The smallest number with a given water capacity

Python 2, 238 210 192 177 bytes ...
Lucenaposition's user avatar
2 votes

The smallest number with a given water capacity

Charcoal, 66 bytes NθW¬⁼θω«→≔⟦⟧υ≔ⅈηF…²η«≔Xκ⌕X⁰⮌↨ηκ⁰ζ≧÷ζη¿⊖ζ⊞υζ»≔ΣEυ⁻⌊⟦⌈…υ⊕λ⌈✂υλ⟧κω»Iⅈ Try it online! Link is to verbose version of code. Too slow on TIO for ...
Neil's user avatar
  • 177k
1 vote

The smallest number with a given water capacity

MATL, 25 bytes Based on @ovs' J answer. `@&YF^ttP,wY>]P&vX<-sG+}@ Try it at MATL online!
Luis Mendo's user avatar
  • 105k
5 votes

The smallest number with a given water capacity

J, 39 bytes (]+[~:1#.[:(-~>./\<.>./\.)__^/@q:])^:_~ Attempt This Online! ...
ovs's user avatar
  • 60.6k
4 votes

The smallest number with a given water capacity

R+numbers, 186 177 bytes ...
Eonema's user avatar
  • 331
5 votes

The smallest number with a given water capacity

JavaScript (ES6), 145 bytes -21 bytes and faster code thanks to @tsh ...
Arnauld's user avatar
  • 198k

Top 50 recent answers are included