这道题完全是水题啊
1785. Lost in Localization
Time limit: 1.0 second
Memory limit: 64 MB
Memory limit: 64 MB
The Lavin Interactive Company, which has developed the turn-based strategy Losers-V, is constantly extending its target market by localizing the game to as many languages as it can. In particular, they are interested in creating a version of the game in Anindilyakwa, which is one of the languages spoken by indigenous Australians.
However, the localization is complicated by the fact that Anindilyakwa has no numerals. How can a phrase such as “You have seven black dragons and your enemy has forty black dragons” be translated into this language? The localizers have decided to translate it as follows: “You have few black dragons and your enemy has lots of black dragons.” They have compiled a table showing the rule of replacing numbers of monsters by Anindilyakwa words.
Help the localizers automatize the process. Write a program that would output the appropriate word given the number of monsters.
Number | Designation in Anindilyakwa |
from 1 to 4 | few |
from 5 to 9 | several |
from 10 to 19 | pack |
from 20 to 49 | lots |
from 50 to 99 | horde |
from 100 to 249 | throng |
from 250 to 499 | swarm |
from 500 to 999 | zounds |
from 1000 | legion |
Input
The only line contains the number of monsters
n (1 ≤
n ≤ 2000).
Output
Output the word corresponding to the given number of monsters in the Anindilyakwa language.
Samples
input | output |
---|---|
7 | several |
40 | lots |
代码如下:
- #include<iostream>
- #include<cstring>
- using namespace std;
- int main()
- {
- int a;
- while(cin>>a)
- {
- if(a>=1&&a<=4)cout<<"few"<<endl;
- else if(a>=5&&a<10)cout<<"several"<<endl;
- else if(a>=10&&a<20)cout<<"pack"<<endl;
- else if(a>=20&&a<50)cout<<"lots"<<endl;
- else if(a>=50&&a<100)cout<<"horde"<<endl;
- else if(a>=100&&a<250)cout<<"throng"<<endl;
- else if(a>=250&&a<500)cout<<"swarm"<<endl;
- else if(a>=500&&a<1000)cout<<"zounds"<<endl;
- else if(a>=1000)cout<<"legion"<<endl;
- }
- return 0;
- }