上一页 1 ··· 8 9 10 11 12 13 下一页
摘要: Description You are given the string s of length n and the numbers p, q. Split the string s to pieces of length p and q. For example, the string "Hell 阅读全文
posted @ 2016-07-21 18:04 野小子& 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要 阅读全文
posted @ 2016-07-21 08:48 野小子& 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Description Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 Description Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 Excel可以对一组纪录按任意指定列排序。现请你编写程序实现类似功能。 Input 测试输入包含若干测试用例 阅读全文
posted @ 2016-07-20 21:25 野小子& 阅读(251) 评论(0) 推荐(0) 编辑
摘要: Description Giving N integers, V1, V2,,,,Vn, you should find the biggest value of F. Description Giving N integers, V1, V2,,,,Vn, you should find the 阅读全文
posted @ 2016-07-20 20:26 野小子& 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Description A range is given, the begin and the end are both integers. You should sum the cube of all the integers in the range. Description A range i 阅读全文
posted @ 2016-07-20 18:05 野小子& 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 6231 阅读全文
posted @ 2016-07-20 17:13 野小子& 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Problem Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个 阅读全文
posted @ 2016-07-20 16:36 野小子& 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int a[500000]={1,1}; //1不是素数,0是素数 3 int main() 4 { 5 for(int i=2;i<=10000;i++) 6 { 7 if(a[i]==1) continue; 8 for(int j=i*2;j<=10000;j+=i) 9 ... 阅读全文
posted @ 2016-07-20 15:28 野小子& 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int f(int m,int n) 3 { 4 if(m%n==0) return n; 5 else 6 return f(n,m%n); 7 } 8 int main() 9 { 10 int m,n,p,q; 11 while(scanf("%d%d",&m,&n)!=EOF) 12 { 13 ... 阅读全文
posted @ 2016-07-20 14:48 野小子& 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int a[100000+11]={1,1}; 3 int main() 4 { 5 for(int i=2;i<100000;i++) 6 { 7 if(a[i] == 1) continue; 8 for(int j=i*2;j<100000;j+=i) 9 { 10 ... 阅读全文
posted @ 2016-07-20 10:09 野小子& 阅读(155) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 下一页