How can I get the square root for a very large integer?
<p>I need to determine x from the expression root(y).</p>

<p>"Y" has a range to its separated value with maximum 10^1000.
I solved it in the normal way and I saw the right result. But when Y is very large, the program outputs the wrong answer.</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;math.h&gt;
int main()
{
    long long int x,y;
    scanf("%lld",&amp;y);
    x=sqrt(y);
    printf("%lld",x);
    return 0;
}
</code></pre>