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

Output limit exceeded test #1
Posted by ashwin 20 Nov 2010 14:47
#include<stdio.h>
    #include<math.h>
    //#include<conio.h>
    void main(){
        //clrscr();

          double i;
       //    unsigned long num;
          double range=pow(10,18);

        while((scanf("%lf",&i))){
            if(i<0)
                break;
            if(i>range)
                break;
            printf("\n%.4lf",sqrt(i));
        }
        //getch();

    }

what is wrong in my code can anyone please tell

Edited by author 20.11.2010 14:47
Re: Output limit exceeded test #1
Posted by ashwin 20 Nov 2010 18:50
double i=0;
double nums[100000];


while((scanf("%lf",&nums[i])!=EOF){
i++;

while(i>=0){
 printf("\n%.4lf",sqrt(nums[i]);
i--;
}

Now i am getting array size is too huge and i even tried dynamic allocation and it doesnt work.. I am using turbo C++ Version 3.0 compiler.
Please help me with this
Re: Output limit exceeded test #1
Posted by ashwin 6 Dec 2010 19:32
Please help guys!!!!!!!!!