Skip to main content
+1 because int division (x%y) was changed to return floats, so now it requires floor (_x%y)
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k)K (ngn/k), 84 7778 bytes

-4 thanks to @Bubbler

{#1_(|/(x/'{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}/2#y)x')\1}{x*y%*|_x*y%*|(*:)(|!\)/x,y}

Try it online!Try it online!

/ungolfed
p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]} /partitions
g:*|(*:)(|!\)/                       /gcd
l:{x*y%g_x*y%g x,y}                        /lcm
f:{#1_(|/(l/'p/2#x)l')\1}            /landau log

K (ngn/k), 84 77 bytes

-4 thanks to @Bubbler

{#1_(|/(x/'{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}/2#y)x')\1}{x*y%*|(*:)(|!\)/x,y}

Try it online!

/ungolfed
p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]} /partitions
g:*|(*:)(|!\)/                       /gcd
l:{x*y%g x,y}                        /lcm
f:{#1_(|/(l/'p/2#x)l')\1}            /landau log

K (ngn/k), 84 78 bytes

-4 thanks to @Bubbler

{#1_(|/(x/'{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}/2#y)x')\1}{_x*y%*|(*:)(|!\)/x,y}

Try it online!

/ungolfed
p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]} /partitions
g:*|(*:)(|!\)/                       /gcd
l:{_x*y%g x,y}                       /lcm
f:{#1_(|/(l/'p/2#x)l')\1}            /landau log
added 197 characters in body
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k), 8484 77 bytes

-4 thanks to @Bubbler

{#1_(|/(x/'{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}/2#y)x')\1}{x*y%*|(*:)(|!\)/x,y}

Try it online!

/ungolfed
p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]} /partitions
lg:{x*y%*|*|(*:)(|!\)/                       /gcd
l:{x*y%g x,y}                        /lcm
f:{#1_(|/(l/'p/2#x)l')\1}            /landau log

Try it online!

p partitions, l lcm

K (ngn/k), 84 bytes

p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}
l:{x*y%*|(*:)(|!\)/x,y}
{#1_(|/(l/'p/2#x)l')\1}

Try it online!

p partitions, l lcm

K (ngn/k), 84 77 bytes

-4 thanks to @Bubbler

{#1_(|/(x/'{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}/2#y)x')\1}{x*y%*|(*:)(|!\)/x,y}

Try it online!

/ungolfed
p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]} /partitions
g:*|(*:)(|!\)/                       /gcd
l:{x*y%g x,y}                        /lcm
f:{#1_(|/(l/'p/2#x)l')\1}            /landau log
added 27 characters in body
Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87

K (ngn/k), 84 bytes

p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}
l:{x*y%*|(*:)(|!\)/x,y}
{#1_(|/(l/'p/2#x)l')\1}

Try it online!

p partitions, l lcm

K (ngn/k), 84 bytes

p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}
l:{x*y%*|(*:)(|!\)/x,y}
{#1_(|/(l/'p/2#x)l')\1}

Try it online!

K (ngn/k), 84 bytes

p:{$[x;,/i,''(x-i)o'y&i:1+!x&y;,!0]}
l:{x*y%*|(*:)(|!\)/x,y}
{#1_(|/(l/'p/2#x)l')\1}

Try it online!

p partitions, l lcm

Source Link
ngn
  • 15.3k
  • 2
  • 43
  • 87
Loading