nth root of v by 51b

-module(n).
-export([m/0]).
m()->{_,[N,V]}=io:fread('',"~d~d"),E=p(10,100,1),G=fun(I,S,L)->P=p(M=(S+L)div 2,N,E),if S+2>L->S;P<V*E->I(I,M,L);0<1->I(I,S,M)end end,F=G(G,E,3*E),io:format("~p.~100..0b",[F div E,F rem E]).
p(_,0,E)->E;p(X,N,E)->X*p(X,N-1,E)div E.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page