码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
[LeetCode] Interleaving String [30]
题目Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3...
分类:其他好文   时间:2014-07-07 12:04:54    阅读次数:142
Quick Cocos2dx 场景转换问题
项目结构是这样子的:主场景代码是这样子的:local MainScene = class("MainScene", function() return display.newScene("MainScene")end)function MainScene:ctor() self.laye...
分类:其他好文   时间:2014-07-07 12:00:52    阅读次数:170
获取本月最后一天23点59分59秒
1 /** 2 * 获取本月最后一天23点59分59秒 3 * @param date 4 * @return 5 */ 6 public static Date getLastMonthDay(Date date) { 7 Calenda...
分类:其他好文   时间:2014-07-07 10:45:57    阅读次数:168
循环-05. 兔子繁衍问题(15)
1 #include 2 using namespace std; 3 int sum(int n){ 4 if(n==1||n==2) 5 return 1; 6 else 7 return sum(n-1)+sum(n-2); 8 } 9 int...
分类:其他好文   时间:2014-07-07 10:45:18    阅读次数:188
循环-07. 爬动的蠕虫(15)
1 #include 2 using namespace std; 3 int u,d; 4 int sum(int t){ 5 if(t%2==0) 6 return (u-d)*t/2; 7 else 8 return u*(t/2+1)-d*t...
分类:其他好文   时间:2014-07-07 10:15:59    阅读次数:168
循环-04. 验证“哥德巴赫猜想”(20)
1 #include 2 #include 3 using namespace std; 4 bool isPrime(long n){ 5 int i; 6 for(i=2;i1&&i>sqrt(n))10 return true;11 else12 ...
分类:其他好文   时间:2014-07-07 09:54:37    阅读次数:221
简单递归练习
1 #include 2 //#include 3 int jiecheng(int i){ 4 //①算n! 5 if(i==1)return 1; 6 return i*jiecheng(i-1); 7 } 8 int Fibonacci(int i){ 9 /...
分类:其他好文   时间:2014-07-07 09:50:44    阅读次数:210
循环-08. 二分法求多项式单根(20)
1 #include 2 #include 3 #include 4 using namespace std; 5 double a3,a2,a1,a0; 6 double f(double x){ 7 return a3*pow(x,3)+a2*pow(x,2)+a1*x+a0; 8 }...
分类:其他好文   时间:2014-07-07 09:15:47    阅读次数:239
c# 中Intern的作用
1. 函数如下public static string Intern(string str){ if(str == null) { throw new ArgumentNullException("str"); } return Thr...
分类:其他好文   时间:2014-07-03 22:11:06    阅读次数:268
循环-15. 统计素数并求和(20)
1 #include 2 #include 3 using namespace std; 4 bool isPrime(int n){ 5 int i; 6 for(i=2;i=2&&i>sqrt(n))10 return true;11 else12 ...
分类:其他好文   时间:2014-07-03 21:37:23    阅读次数:167
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!