码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
小明A+B(杭电2096)
/*小明A+B Problem Description 小明今年3岁了, 现在他已经能够认识100以内的非负整数, 并且能够进行100以内的非负整数的加法计算. 对于大于等于100的整数, 小明仅保留该数的最后两位进行计算, 如果计算结果大于等于100, 那么小明也仅保留计算结果的最后两位. 例如, 对于小明来说: 1) 1234和34是相等的 2) 35+80=15 给定非负整数A...
分类:其他好文   时间:2014-07-26 15:22:55    阅读次数:243
hdoj 2041 超级阶梯
代码:#include int main(){int n;int i;int m;int count;int dp[50];while(scanf("%d",&n)!=EOF){dp[1]=1;dp[2]=1;dp[3]=2;while(n--){count=0;scanf("%d",&m);for...
分类:其他好文   时间:2014-07-26 14:57:10    阅读次数:244
一步一步实现基于Task的Promise库(四)无参数的WorkItem
接着上一篇我直接给出代码,现在支持了new Task(), then(), all(), any() 这些不传参的调用方式。 1 (function(){ 2 var isFunction = function (target) { 3 return target in...
分类:其他好文   时间:2014-07-26 14:33:31    阅读次数:320
【leetcode刷题笔记】Interleaving String
Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1="aabcc",s2="dbbca",Whens3="aadbbcbcac", return true.Whens3="...
分类:其他好文   时间:2014-07-26 14:24:50    阅读次数:251
选择排序
#includevoid SelectSort(int n,int a[]){ for(int i=0; i<n; i++) { int MIN=a[i]; int k=i; for(int j=i+1; j<n; j++) { ...
分类:其他好文   时间:2014-07-26 14:12:34    阅读次数:206
?? 运算符(C# 参考)
?? 运算符称为 null 合并运算符,用于定义可以为 null 值的类型和引用类型的默认值。 如果此运算符的左操作数不为 null,则此运算符将返回左操作数;否则返回右操作数。 class NullCoalesce{ static int? GetNullableInt() { return nu...
分类:其他好文   时间:2014-07-26 14:07:14    阅读次数:197
jQuery 中的最基本代码 4句话
(function(){ var jQuery = function( ) {return new jQuery.init( );}; //1jQuery.prototype = { init:function(){}, fx:function(){ alert('这是类库的一个实例化...
分类:Web程序   时间:2014-07-26 14:06:55    阅读次数:232
[LeetCode] Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example: Given binary tree {3...
分类:其他好文   时间:2014-07-26 14:03:16    阅读次数:174
插入排序
#includevoid InsertSort(int n,int a[]){ int j; for(int i=0;i=0;j--) { if(a[j]>tmp) { a[j+1]=a[j]; ...
分类:其他好文   时间:2014-07-26 14:02:05    阅读次数:171
LeetCode:Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 class Solution { 2 public: 3 int reverse(int x){ 4 ...
分类:其他好文   时间:2014-07-26 13:54:24    阅读次数:206
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!