URAL 1785 Lost in Localization
来源:互联网 发布:sql 返回true false 编辑:程序博客网 时间:2024/06/01 23:29
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.NumberDesignation in Anindilyakwafrom 1 to 4fewfrom 5 to 9severalfrom 10 to 19packfrom 20 to 49lotsfrom 50 to 99hordefrom 100 to 249throngfrom 250 to 499swarmfrom 500 to 999zoundsfrom 1000legionHelp the localizers automatize the process. Write a program that would output the appropriate word given the number of monsters.
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
7
several
40
lots
Problem Author: folklore
Problem Source: Ural Regional School Programming Contest 2010
Problem Source: Ural Regional School Programming Contest 2010
很久没做过这么水的题了;
#include<iostream>#include<cstdlib>#include<string>#include<algorithm>#include<cstdio>#include<cmath>#include<cstring>#include<stack>#include<queue>#include<iomanip>#include<map>#include<set>#define pi 3.14159265358979323846using namespace std;int main(){ int n; scanf("%d",&n); if(n>=1&&n<=4) printf("few\n"); else if(n>=5&&n<=9) printf("several\n"); else if(n>=10&&n<=19) printf("pack\n"); else if(n>=20&&n<=49) printf("lots\n"); else if(n>=50&&n<=99) printf("horde\n"); else if(n>=100&&n<=249) printf("throng\n"); else if(n>=250&&n<=499) printf("swarm\n"); else if(n>=500&&n<=999) printf("zounds\n"); else if(n>=1000) printf("legion\n"); return 0;}
0 0
- URAL 1785 Lost in Localization
- Localization in XCode4
- What to test in localization?
- Guassian Process in Face Localization
- lost in 2012
- Lost in the City
- Lost in the City
- Codeforces883F-Lost in Transliteration
- Localization
- #1094 : Lost in the City
- #1094 Lost in the City
- #1094 : Lost in the City
- hihocoder:Lost in the City
- lost in the city(枚举)
- Lost in Translation
- codeforces F. Lost in Transliteration
- Lost in the City hihoCoder1094
- Lost~~
- 如何解决数组的从小到大的排序
- 摆脱救火员,让系统自身具备“容错”能力
- Mysql主从复制
- 【2】JAVA---地址App小软件(ListPanel.class)(表现层)
- IO的五种模型
- URAL 1785 Lost in Localization
- Elasticsearch学习(1)之安装部署(单机多节点模式)
- 继承之动态内存分配&深拷贝浅拷贝
- readline&readlines
- VK Cup 2016 - Round 1 (Div. 2 Edition)----D Bear and Polynomials 数论+二进制,很好的题!!!
- 仅用一个数组而实现两个栈的例程 除非数组的每一个单元都被使用 否则栈例程不能有溢出声明
- 几种服务器端IO模型的简单介绍及实现
- ExtractFileDrive、ExtractFilePath、ExtractFileDir、ExtractFileName、ExtractFileExt、ExtractRelativePath
- linux svn服务器配置