Skip to main content
added 52 characters in body
Source Link
vazt
  • 301
  • 1
  • 4

C (gcc), 85 8181 75 bytes

Saved 4 bytes and then 6 bytes thanks to @ceilingcat@ceilingcat's re-ordering of assignments

r[5];f(n){r[1]=(n=(n-(*r=n*n*n))/6+1)*n*n--;r[2]=;r[3]=r[4]=-n*n*n;r[2]=-n*n*n;r[3]=n=-++n*n*n;r[4]=n;n*n*n;}

Try it online!Try it online!

C (gcc), 85 81 bytes

Saved 4 bytes thanks to @ceilingcat

r[5];f(n){r[1]=(n=(n-(*r=n*n*n))/6+1)*n*n--;r[2]=--n*n*n;r[3]=n=-++n*n*n;r[4]=n;}

Try it online!

C (gcc), 85 81 75 bytes

Saved 4 bytes and then 6 bytes thanks to @ceilingcat's re-ordering of assignments

r[5];f(n){r[1]=(n=(n-(*r=n*n*n))/6+1)*n*n--;r[3]=r[4]=-n*n*n;r[2]=--n*n*n;}

Try it online!

added 56 characters in body
Source Link
vazt
  • 301
  • 1
  • 4

C (gcc), 8585 81 bytes

Saved 4 bytes thanks to @ceilingcat

r[5];f(n){*r=n*n*n;r[1]=r[1]=(n=(n-n*n*n(*r=n*n*n))/6+1)*n*n--;r[2]=--n*n*n;r[3]=n=-++n*n*n;r[4]=n;}

Try it online!Try it online!

C (gcc), 85 bytes

r[5];f(n){*r=n*n*n;r[1]=(n=(n-n*n*n)/6+1)*n*n--;r[2]=--n*n*n;r[3]=n=-++n*n*n;r[4]=n;}

Try it online!

C (gcc), 85 81 bytes

Saved 4 bytes thanks to @ceilingcat

r[5];f(n){r[1]=(n=(n-(*r=n*n*n))/6+1)*n*n--;r[2]=--n*n*n;r[3]=n=-++n*n*n;r[4]=n;}

Try it online!

Source Link
vazt
  • 301
  • 1
  • 4

C (gcc), 85 bytes

r[5];f(n){*r=n*n*n;r[1]=(n=(n-n*n*n)/6+1)*n*n--;r[2]=--n*n*n;r[3]=n=-++n*n*n;r[4]=n;}

Try it online!