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 1785. Lost in Localization

Show all messages Hide all messages

Got Accepted Megapolice 21 Dec 2012 21:12
var
  n: integer;
begin
  readln(n);
  if (n>=1) and (n<=4) then
    writeln('few');
  if (n>=5) and (n<=9) then
    writeln('several');
  if (n>=10) and (n<=19) then
    writeln('pack');
  if (n>=20) and (n<=49) then
    writeln('lots');
  if (n>=50) and (n<=99) then
    writeln('horde');
  if (n>=100) and (n<=249) then
    writeln('throng');
  if (n>=250) and (n<=499) then
    writeln('swarm');
  if (n>=500) and (n<=999) then
    writeln('zounds');
  if n>=1000 then
    writeln('legion');
end.
Re: Got Accepted IlushaMax 7 Mar 2016 18:28
will be better with CASE OF
Re: Got Accepted Kondor 29 Mar 2016 10:14
IMHO, using CASE OF operator, You'll get more esthetic look, no more. And insignificant advantage in performance.
Slowpokes to the rescue? ToadMonster 29 Mar 2016 18:49
IlushaMax, could you check message year and don't answer if message is 2 (or more) years old?
Thanks in advance.