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

Pascal reverse root
Posted by Johanes Patrick S 13 Apr 2016 12:34
var
    a,b,c,d,e,f,g,h : real
begin
    read(a,b,c,d);
    e := sqrt(a);
    f := sqrt(b);
    g := sqrt(c);
    h := sqrt(d);
    writeln(h:0:4);
    writeln(g:0:4);
    writeln(f:0:4);
    writeln(e:0:4);
end.
why is my answer wrong?
Re: Pascal reverse root
Posted by ToadMonster 13 Apr 2016 13:14
Have you read task? Why no? You should try.

>Input
> The input stream contains a set of integer numbers. The numbers are
> separated by any number of spaces and line breaks. A size of the input
> stream does not exceed 256 KB.

Edited by author 13.04.2016 13:14
Re: Pascal reverse root
Posted by Johanes Patrick S 13 Apr 2016 13:38
i racked my brain, but i unable found solution so can i look your source code in pascal?
Re: Pascal reverse root
Posted by ToadMonster 13 Apr 2016 13:58
Sure no.
1) Why do you think I know pascal?
2) Problem is 2nd easiest here. You should be able to solve it yourself.

What problem do you have?

How to read numbers from stream?
http://acm.timus.ru/help.aspx?topic=pascal
"How to read input data until the end of stream" topic

How to estimate max input size?
It's about 256K/2 numbers.

How to print results in reverse order?
Pff. Give up for a while and learn programming.

Edited by author 13.04.2016 14:00
Re: Pascal reverse root
Posted by Johanes Patrick S 14 Apr 2016 13:45
Where the stop position if there is only one input? I am confused, please explain the problems.