# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
944515 | rainboy | 제곱근 구하기 1 (gs13068_sqrt1) | C++17 | 1 ms | 604 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 <math.h>
#include <stdio.h>
int main() {
long long n;
int r;
scanf("%lld", &n), r = sqrt(n);
while ((long long) (r + 1) * (r + 1) <= n)
r++;
while ((long long) r * r > n)
r--;
printf("%f\n", r + (double) (n - (long long) r * r) / (r * 2 + 1));
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |