码迷,mamicode.com
首页 >  
搜索关键字:number    ( 26994个结果
第30章中的新单词
1. decade /'dekeid/ n. a period of ten years; 十年;十年期间;2. exponential /,eksp?'nen??/ adj. technical using a sign that shows how many times a number is ...
分类:其他好文   时间:2015-07-08 18:00:18    阅读次数:153
LeetCode:Largest Number(Greedy)
problem:Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest f...
分类:其他好文   时间:2015-07-08 17:51:23    阅读次数:115
1 Two Sum
1 Two Sum链接:https://leetcode.com/problems/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 t...
分类:其他好文   时间:2015-07-08 14:39:14    阅读次数:131
js 获取某年的某天是第几周
/**2 * 判断年份是否为润年3 *4 * @param {Number} year5 */6 function isLeapYear(year) {7 return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0);8 }9 /**1...
分类:Web程序   时间:2015-07-08 14:20:12    阅读次数:129
Leetcode 233 Number of Digit One
1. 问题描述  给定一个整数n,在所有不大于n的非负整数中,计算包含数字1的整数的个数。例如n=13n = 13的结果为6,包含1的数字有1,10,11,12,13。2. 方法与思路  这个问题最直观的方法就是累加1到n所有的包含1的数的个数。每个数通过循环取余10的方法判断是否包含1。但是这种思路效率并不高,数字n有lognlogn位,总得时间复杂度为O(nlogn)O(nlogn)。   利...
分类:其他好文   时间:2015-07-08 12:58:00    阅读次数:115
[leetcode]3 Sum closest
问题叙述性说明:Given an array S of n integers, find three integers inS such that the sum is closest to a given number, target. Return the sum of the three in...
分类:其他好文   时间:2015-07-08 12:46:57    阅读次数:134
Excel Sheet Column Number
https://leetcode.com/problems/excel-sheet-column-number/ 1 class Solution { 2 public: 3 int titleToNumber(string s) { 4 int size=s.size();...
分类:其他好文   时间:2015-07-08 12:25:53    阅读次数:95
Happy Number
https://leetcode.com/problems/happy-number/快乐数 1 class Solution { 2 public: 3 bool isHappy(int n) { 4 int res; 5 int temp; 6 ...
分类:移动开发   时间:2015-07-08 12:21:17    阅读次数:176
UVa 11375 Matches
ProblemE: Matches We can make digits with matches as shown below: Given N matches, find the number of different numbers representable using the matches. We shall only make numbers greate...
分类:其他好文   时间:2015-07-08 11:06:32    阅读次数:117
Project Euler:Problem 56 Powerful digit sum
A googol (10100) is a massive number: one followed by one-hundred zeros; 100100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each num...
分类:其他好文   时间:2015-07-08 09:39:56    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!