9 lines
128 B
Text
9 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
|