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

Solution C++11
Posted by KKKK 15 Jan 2018 18:25
#include <iostream>
using namespace std;
int main() {
  int a;
  cin >> a;
  if (a >= 1 and  a <= 4){
    cout << "few";
  }
  if (a >= 5 and a <= 9){
    cout << "several";
  }
  if (a >= 10 and a <= 19){
    cout << "pack";
  }
  if (a >= 20 and a <= 49){
    cout << "lots";
  }
  if (a >= 50 and a <= 99){
    cout << "horde";
  }
  if (a >= 100 and a <= 249){
    cout << "throng";
  }
  if (a >= 250 and a <= 499){
    cout << "    swarm";
  }
  if (a >= 500 and a <= 999){
    cout << "    zounds";
  }
  if (a > 1000){
    cout << "    legion";
  }

}

Edited by author 15.01.2018 18:30

Edited by author 15.01.2018 18:30
Re: Solution C++11
Posted by Norease 4 Jun 2021 02:28
don`t working) I think that a >= 1000