Skip to main content
deleted 82 characters in body
Source Link
user92069
user92069

Erlang (escript), 7968 bytes

Filters out all factors, and selects the ones in the middle.

f(X)->Y=lists:lastmax([I||I<-lists:seq(1,ceil(math:sqrt(X))),X rem I==0]I==0,I*I=<X]),[Y,X/Y].

Try it online!Try it online!

Erlang (escript), 79 bytes

Filters out all factors, and selects the ones in the middle.

f(X)->Y=lists:last([I||I<-lists:seq(1,ceil(math:sqrt(X))),X rem I==0]),[Y,X/Y].

Try it online!

Erlang (escript), 68 bytes

f(X)->Y=lists:max([I||I<-lists:seq(1,X),X rem I==0,I*I=<X]),[Y,X/Y].

Try it online!

Source Link
user92069
user92069

Erlang (escript), 79 bytes

Filters out all factors, and selects the ones in the middle.

f(X)->Y=lists:last([I||I<-lists:seq(1,ceil(math:sqrt(X))),X rem I==0]),[Y,X/Y].

Try it online!