Skip to main content
add explanation
Source Link
640KB
  • 12.4k
  • 2
  • 38
  • 61

PHP, 38 bytes

while(($a=decbin$n=decbin(++$x))%$argn);echo$a;;echo$n; 

Try it online!Try it online!

Counts up n in binary and divides it's decimal representation by k until there is no remainder; indicating the first, smallest multiple.

PHP, 38 bytes

while(($a=decbin(++$x))%$argn);echo$a; 

Try it online!

PHP, 38 bytes

while(($n=decbin(++$x))%$argn);echo$n; 

Try it online!

Counts up n in binary and divides it's decimal representation by k until there is no remainder; indicating the first, smallest multiple.

Source Link
640KB
  • 12.4k
  • 2
  • 38
  • 61

PHP, 38 bytes

while(($a=decbin(++$x))%$argn);echo$a; 

Try it online!