Submission #7598

#TimeUsernameProblemLanguageResultExecution timeMemory
7598jihoon제곱근 구하기 1 (gs13068_sqrt1)C++98
0 / 1
0 ms1088 KiB
#include<cstdio>
long long int nn;
long double prev,nw;
int main(){
  scanf("%lld",&nn);
  nw=10000.0;
  while(prev!=nw){
    prev=nw;
    nw+=(nn/nw);
    nw/=2;
  }
  printf("%.6lf",prev);
}
#Verdict Execution timeMemoryGrader output
Fetching results...