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

is it wrong?? and why??
Posted by Tonmoy 31 Jul 2016 21:47
#include <stdio.h>
#include<math.h>
int main()
{ int n;
double t[100];
scanf("%d", &n);
int i;
for(i=1; i<=n;i++){

    scanf("%lf", &t[i]);

}
for(i=n; i>0; i--){

    printf("%lf\n",sqrt(t[i]));
}
return 0;

}
Re: is it wrong?? and why??
Posted by ToadMonster 1 Aug 2016 01:05
Please read task and example carefully.
1) scanf("%d", &n); - do you see n in example input?
2) double t[100]; - where in task did you find "100" limitation?