URAL 1785 Lost in Localization
2016-03-31 00:01
489 查看
Time limit: 1.0 second |
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 |
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.14159265358979323846 using 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; }
相关文章推荐
- Mysql主从复制
- linux svn服务器配置
- Android 中Handler Message MessageQueue looper 关系及流程
- 摆脱救火员,让系统自身具备“容错”能力
- Git系列笔记之四:分支管理
- VIEWGOOD(远古)政企行业会议高清直播系统介绍
- Chrome浏览器不兼容lodop打印控件
- vim去除自动备份
- HashSet,TreeSet和LinkedHashSet的区别
- Comparable与Comparator的区别
- Collections类方法详解
- ArrayList和LinkedList的区别
- ArrayList和LinkedList的几种循环遍历方式及性能对比分析
- myeclipse中java文件头注释格式设置
- JQuery.property
- jQuery.fn和jQuery.prototype区别介绍
- 禁止 input 表单输入框粘贴的方法
- oracle日期格式转换 to_date(),to_char()
- maven 小错误的处理备注
- JSP自定义标签