码迷,mamicode.com
首页 >  
搜索关键字:peime number    ( 26996个结果
UVA 10539 - Almost Prime Numbers(数论)
UVA 10539 - Almost Prime Numbers题目链接题意:给定一个区间,求这个区间中的Almost prime number,Almost prime number的定义为:仅仅能整除一个素数。思路:既然是仅仅能整除一个素数,那么这些数肯定为素数的x次方(x > 1),那么仅仅要...
分类:其他好文   时间:2014-06-26 18:11:51    阅读次数:169
利用Lua实现二叉查找树并进行各种遍历
-- author : coder_zhang-- date : 2014-6-25root = nilfunction insert_node(number) if root == nil then root = {value = number, left = nil, ...
分类:其他好文   时间:2014-06-26 16:51:36    阅读次数:170
Leetcode Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:其他好文   时间:2014-06-26 15:50:35    阅读次数:176
Leetcode Combination Sum II
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ...
分类:其他好文   时间:2014-06-26 15:45:49    阅读次数:163
Leetcode Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:其他好文   时间:2014-06-26 15:10:47    阅读次数:168
leetcode--ZigZag Conversion
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:其他好文   时间:2014-06-26 14:42:23    阅读次数:164
JavaScript小技巧
1.变量转换 看起来很简单,但据我所看到的,使用构造函数,像Array()或者Number()来进行变量转换是常用的做法。始终使用原始数据类型(有时也称为字面量)来转换变量,这种没有任何额外的影响的做法反而效率更高。 1 2 3 4 5 6 7 var myVar   = "3.14159", st...
分类:编程语言   时间:2014-06-26 13:53:45    阅读次数:262
Oracle取月份-不带前面的0
出处:http://www.2cto.com/database/201208/145611.html今天碰到只要取月份和天数,如果月份前面有0要去掉0.比如说2010-01-08 ,需要的结果是1-8. 引出了一系列的sql语句第一: 利用to_number的函数转换自动截0 select to_n...
分类:数据库   时间:2014-06-26 12:39:44    阅读次数:188
LeetCode: Single Number [136]
【题目】 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? 【题意】 给定一个整数数组,其中除了一个数以外,其他数都是成对出现的,...
分类:其他好文   时间:2014-06-26 10:13:27    阅读次数:254
SQL Server 排名函数
Transact-SQL提供了4个排名函数: RANK(),DENSE_RANK(),ROW_NUMBER(),NTILE(),下文是对这4个函数进行的解释。...
分类:数据库   时间:2014-06-26 08:01:11    阅读次数:304
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!