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

Wrong Answer: Can't Understand Why!
Posted by Ashfaqur Rahman 15 Aug 2015 12:23
I am getting wrong answer. But output is identical in my computer. Here is my code -

#include <stdio.h>
#include <math.h>
#define ARRSIZE 32768

int main(){
    unsigned long int n, a[ARRSIZE];
    int i = -1;

    while(!feof(stdin)){
        i++;
        scanf("%lu", &n);
        a[i] = n;
    }

    i--;

    for(; i >=0; i--){
        printf("%0.4lf\n", sqrt(a[i]));
    }

    return 0;
}