typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined"" if (reValue==undefined){ alert("undefined"); } 发现判断不出来,最后查了下资料要用type...
分类:
Web程序 时间:
2014-08-23 08:49:30
阅读次数:
226
Problem Description
Given an N*N*N cube A, whose elements are either 0 or 1. A[i, j, k] means the number in the i-th row , j-th column and k-th layer. Initially we have A[i, j, k] = 0 (1 <= i, j, k <...
分类:
其他好文 时间:
2014-08-23 01:09:39
阅读次数:
274
用来精确浮点数,指定小数点位数. 在html中用法 {{?number_expression?|?number?:?fractionSize}} 在js中用法 $filter(‘number‘)(number,?fractionSize) 参数 number 待精确的数字 factionSize(可选) 小数点...
分类:
Web程序 时间:
2014-08-22 22:39:49
阅读次数:
213
Description
``Pinary" number is a positive number using only two digits ``0" and ``1" with usual rule that it must not begin with a 0, and the additional rule that two successive digits must not be...
分类:
其他好文 时间:
2014-08-22 21:16:19
阅读次数:
237
题目来源:URAL 1748. The Most Complex Number
题意:求一个小于等于n的因子最多的数
思路:搜索+剪枝
#include
#include
using namespace std;
typedef unsigned __int64 LL;
LL prime[16] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53...
分类:
其他好文 时间:
2014-08-22 21:12:09
阅读次数:
228
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-08-22 21:06:19
阅读次数:
203
NaN表示一个不能产生正常结果的运算结果。它不等于任何值,包括它自己。可以用isNaN(number)来检测。同Java中的字符串一样,JS中的字符串是不可变的。也就是说一旦字符串被创建,就无法改变。下标表达式(如s[3],代替s.charAt(3))可以读取字符,但是不能用于改变字符。null,u...
分类:
编程语言 时间:
2014-08-22 19:28:19
阅读次数:
280
//保留几位小数
function fmoney(obj, num) {
return obj.value = formatNumber(obj.value, 2, 1);
}
/*
将数值四舍五入后格式化.
@param num 数值(Number或者string)
@param cent 要保留的小数位(Number)
@param isThousand 是否需要千分...
分类:
其他好文 时间:
2014-08-22 17:59:19
阅读次数:
225
Problem 35
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime.
There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13,...
分类:
其他好文 时间:
2014-08-22 17:52:39
阅读次数:
185
Combination Sum
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums
to T.
The same repeated number may be chosen ...
分类:
其他好文 时间:
2014-08-22 16:24:19
阅读次数:
202