ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

dukallis Why is that wrong on the first test [1] // Problem 1001. Reverse Root 20 Oct 2018 00:31
#include <iostream>
#include <cmath>

void rSqrt(void)
{
    unsigned long int n = 0;
    if (scanf("%lu", &n) != -1)
    ¦  rSqrt();
    else
    ¦   return;
    printf("%.4f\n", sqrt(n));
    return;
}

int main()
{
    rSqrt();
    return 0;
}
ToadMonster Re: Why is that wrong on the first test // Problem 1001. Reverse Root 23 Oct 2018 19:02
C and C++ programs are compiled on the server with the 32-bit Microsoft Visual C++ 2017 or MinGW GCC 7.1 or Clang 4.0.1.

So, sizeof(unsigned long)==4.

Edited by author 23.10.2018 19:03