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

Runtime error (access violation)
Posted by Georgy Mogafk 13 Nov 2014 20:32
delete please/

Edited by author 13.11.2014 21:07
Re: Runtime error (access violation)
Posted by Zubair 26 Feb 2015 00:32
I tried the following:

#include<stdio.h>
#include<math.h>
#include<string.h>

int main (){

    unsigned long long int *inputNumber;
    int i = -1;
    int memoryUsed = 0; //256 KB limit

    unsigned long long int input= 0;

    while( input != EOF ){
           scanf("%llu", &input);
            if( input == EOF)
                break;
                if ( memoryUsed > 262144 ){
                    printf("memory Exceed");
                        break;
                }
            inputNumber[++i] = input;
            memoryUsed = memoryUsed + 8;
    };

    for(  ; i >= 0 ; i-- ){
        printf("%.4f\n", sqrt(inputNumber[i]));
    }

    return 0;
}

but it gives same error