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

Common Board

1153 crash...why?
Posted by Alastor 19 May 2009 19:59
var
n,i,j:extended;
begin
readln(n);{n<=10^600}
j:=sqrt(1/4+2*n);
i:=-1/2+j;
writeln(trunc(i));

end.

test N6. Error: Crash (floating-point invalid operation)

why??

Thanks for helping
Re: 1153 crash...why?
Posted by Sergey Lazarev (MSU TB) 20 May 2009 00:20
You shouldn't use extended. Use long arithmetic (or another language).