Search code examples
algorithmnumber-theory

Weird answer to "What is the smallest number *n* by which the given number *x* must be divided to make it into a perfect square?"


I came across the following question: What is the smallest number n by which the given number x must be divided to make it into a perfect square?

n = find_number ( x )

I know the standard way to do this to find the prime factors of x and multiple by what is necessary to have perfect squares in the prime factors, but I saw this answer:

The number is 1/x so x/1/x= x^2

Not sure if that it completely wrong, or is a genius and direct solution

Thanks


Solution

  • no thats not correct ...

    for 2 you say its 1/2 then 2 / (1/2) is 4 which is perfect square cool

    but what about 1/8 then 2 /(1/8) is 16 which is perfect square

    and 1/8 < 1/2 so thats one contradiction you need to know that thats not correct