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 1457. Heating Main

WHY IT DOESN'T WORK ON TEST 1??????????????????? IT IS RIGHT!!!!!
Posted by Reset 23 Jan 2007 21:08
what's the f..k????

var n:longint;
res:extended;
a:array[1..1000]of longint;
i:longint;
begin
readln(n);
for i:=1 to n do begin readln(a[i]);res:=res+a[i];end;
res:=res/n;
writeln(res:0:6);
end.
Re: WHY IT DOESN'T WORK ON TEST 1??????????????????? IT IS RIGHT!!!!!
Posted by KIRILL(ArcSTU) 23 Jan 2007 22:29
All numbers in one line
Re: WHY IT DOESN'T WORK ON TEST 1??????????????????? IT IS RIGHT!!!!!
Posted by kutenin 18 Mar 2011 14:12
for i:=1 to n do begin readln(a[i]);res:=res+a[i];end;

change it in
for i:=1 to n do begin read(a[i]);res:=res+a[i];end;

and you'll get AC
sorry for my bad English