码迷,mamicode.com
首页 >  
搜索关键字:consecutive numbers    ( 8082个结果
JavaScript- The Good Parts Chapter 3 Objects
Upon a homely object Love can wink.—William Shakespeare, The Two Gentlemen of VeronaThe simple types of JavaScript are numbers, strings, booleans (tru...
分类:编程语言   时间:2014-10-01 15:31:31    阅读次数:351
leetcode--two sum
Problem:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of th...
分类:其他好文   时间:2014-09-30 23:33:10    阅读次数:319
leetcode - Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3...
分类:其他好文   时间:2014-09-30 21:48:20    阅读次数:179
[LeetCode] Multiply Strings 字符串相乘
Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. 这个题说数可能是任意的大的非负数,肯定不是让你直接乘起来返回(我干了。。)而是...
分类:其他好文   时间:2014-09-30 06:45:32    阅读次数:167
[LeetCode] Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2014-09-30 04:40:32    阅读次数:182
HDU-4407-Sum(容斥原理)
Problem Description XXX is puzzled with the question below:  1, 2, 3, ..., n (1 Operation 1: among the x-th number to the y-th number (inclusive), get the sum of the numbers which are co-prim...
分类:其他好文   时间:2014-09-30 02:54:32    阅读次数:302
Two Sum
题目描述:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the t...
分类:其他好文   时间:2014-09-30 00:24:31    阅读次数:208
Triangle <leetcode>
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-09-29 22:48:21    阅读次数:163
codeforce A. Design Tutorial: Learn from Math
题意:将一个数拆成两个合数的和, 输出这两个数!(这道题做的真是TMD水啊)开始的时候不知道composite numbers是啥意思,看了3遍才看懂....看懂之后又想用素数筛选法来做,后来决定单个判断一个数是否为素数的方法来写,结果写错了两次,快疯掉了简直.... 1 #include 2 #i...
分类:其他好文   时间:2014-09-29 15:30:11    阅读次数:228
HDU 3117 Fibonacci Numbers(Fibonacci矩阵加速递推+公式)
题目意思很简单:求第n个Fibonacci数,如果超过八位输出前四位和后四位中间输出...,否则直接输出Fibonacci数是多少。 后四位很好求,直接矩阵加速递推对10000取余的结果就是。 前四位搜了一下:http://blog.csdn.net/xieqinghuang/article/details/7789908 Fibonacci的通项公式,对,fibonacci数是有通...
分类:其他好文   时间:2014-09-29 13:52:51    阅读次数:301
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!