RosettaCodeData/Task/Babbage-problem/Julia/babbage-problem.julia
2023-07-01 13:44:08 -04:00

8 lines
128 B
Text

function babbage(x::Integer)
i = big(0)
d = floor(log10(x)) + 1
while i ^ 2 % 10 ^ d != x
i += 1
end
return i
end