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 1585. Penguins

Help Me!
Posted by TiMiD 11 Aug 2011 13:26
Hello! Where here mistake? Prompt please, at all there does not pass 1 test, and at itself in the compiler passes.

var s:array[1..1000] of string;
    i,n,z,x,m,l:integer;
begin
read(n);
z:=0;m:=0;l:=0;
for i:=1 to n do begin
read(s[i]);
if s[i]='Emperor Penguin' then z:=(z+1);
if s[i]='Little Penguin' then m:=(m+1);
if s[i]='Macaroni Penguin' then l:=(l+1);
end;
if (z>=m) and (z>=l) then write('Emperor Penguin');
if (m>=z) and (m>=l) then write('Little Penguin');
if (l>=z) and (l>=m) then write('Macaroni Penguin');
end.
Re: Help Me!
Posted by hatred 12 Aug 2011 01:42
try to use readln instead read

and use > instead >=

Edited by author 12.08.2011 01:43
Re: Help Me!
Posted by TiMiD 12 Aug 2011 12:54
2 hatred : so too does not pass