URAL1785解题报告
来源:互联网 发布:java修改文件编码格式 编辑:程序博客网 时间:2024/05/16 14:20
这道题完全是水题啊
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
代码如下:
- #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;
- }
0 0
- URAL1785解题报告
- 解题报告
- 解题报告
- 解题报告
- 解题报告
- 解题报告
- 解题报告
- 解题报告
- Antiprime解题报告
- expr解题报告
- 华容道解题报告
- tju解题报告
- zju1062/pku1095解题报告
- UsacoGate解题报告 --- 序曲
- ZJU 2060 解题报告
- ZJU 1331 解题报告
- ZJU 1115 解题报告
- ZJU1057解题报告
- Android基础笔记(七)-页面跳转和数据传递
- IOS中延时执行的几种方式的比较和汇总
- error LNK2019: 无法解析的外部符号,VS2010中可能的原因
- Android 弹出窗体
- appearance 设置公共属性
- URAL1785解题报告
- android面试题2
- common-exec调用进程命令
- iOS开发:开发者账号申请后真机调试详细步骤
- tbschedule 前后置处理器、定期执行任务
- .NET 控件的许可验证方案
- 黑马程序员————OC语言BLOCK和Protocol总结
- 原始套接字透析之实现sniffer
- Java初学习 - 多态和实现接口的类的对象赋值给接口引用的方法