Skip to main content
added 1 character in body
Source Link
Variax
  • 151
  • 2

[MATLAB/Octave], 35 34 3426 bytes

A=factorialf=@(1:n) Annz(A<=n)cumprod(end1:n)<=n) 

The second echo will returnThanks @David for the result. Might crash your systemfeedback! I added the f= to have way to call the function for large values of n2 bytes.

[MATLAB/Octave], 35 34 bytes

A=factorial(1:n) A(A<=n)(end) 

The second echo will return the result. Might crash your system for large values of n.

[MATLAB/Octave], 35 34 26 bytes

f=@(n)nnz(cumprod(1:n)<=n) 

Thanks @David for the feedback! I added the f= to have way to call the function for 2 bytes.

added 56 characters in body
Source Link
Variax
  • 151
  • 2

[MATLAB/Octave], 3535 34 bytes

A=factorial(1:99n) A(A<=n)(end) 

The second echo will return the result. Might crash your system for large values of n.

[MATLAB/Octave], 35 bytes

A=factorial(1:99) A(A<=n)(end) 

The second echo will return the result.

[MATLAB/Octave], 35 34 bytes

A=factorial(1:n) A(A<=n)(end) 

The second echo will return the result. Might crash your system for large values of n.

Source Link
Variax
  • 151
  • 2

[MATLAB/Octave], 35 bytes

A=factorial(1:99) A(A<=n)(end) 

The second echo will return the result.