# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4784 | gs13068 | 제곱근 구하기 2 (gs13068_sqrt2) | C++98 | 0 ms | 1088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
int main()
{
long long i,n;
scanf("%lld",&n);
for(i=1;i*i<=n;i++);
if((n-(i-1)*(i-1))*(2*i)+(i*i-n)*(2*(i-1))<(2*(i-1))*(2*i))printf("%lld.%06lld",i-1,((n-(i-1)*(i-1))*1000000+(i-1))/(2*(i-1)));
else printf("%lld.%06lld",i-1,((2*i-i*i+n)*1000000+i)/(2*i));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |