lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Have no idea how to fit it in 36 bytes but simple solution may look like this:

[dirty-solution.lua]
function X(C,L,t,x)L=math.log x,t=3,L(C)for i=0,9 do
x=(x*x+t*t/L(x))/(x+t)end return x end

[test.lua]
C=123 -- 3.6875806713595 next line is 36 byes :)
require "dirty-solution" print(X(C))

ср, 26 июн. 2019 г. в 23:47, Egor Skriptunoff <egor.skriptunoff@gmail.com>:
>
> Global variable "C" contains numeric value > 15.5
> The solution of math equation x^x=C must be printed
> Your code must fit into 36 bytes
> Dirty tricks are allowed