|
|
back to boardmy successful code !!! Posted by david 28 Apr 2013 20:58 var n,i,e,l,m,max:integer; s,maxw:string; begin readln(n); e:=0; l:=0; m:=0; for i:=1 to n do begin readln(s); if s[1]='E' then e:=e+1; if s[1]='L' then l:=l+1; if s[1]='M' then m:=m+1; end; if e>l then begin max:=e; maxw:='Emperor Penguin'; end else begin max:=l; maxw:='Little Penguin'; end; if m>max then begin max:=m; maxw:='Macaroni Penguin'; end; writeln(maxw); end. |
|
|