判断一个 int 是否为回文的有一点要注意的是:int x;int _x = abs(x);对 x 取绝对值的时候,会发生溢出。比如 x = INT_MIN 即 -2147483648 而 INT_MAX 为2147483647其实,负数不是回文数
分类:
其他好文 时间:
2014-09-06 21:08:53
阅读次数:
163
Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephon...
分类:
其他好文 时间:
2014-09-06 18:40:43
阅读次数:
224
注意题目中的一句话:If a number m has bigger evaluating value than all the numbers smaller than it。。。这让我重新想过反素数的定义,应该 是比n小的数的约数的个数都 小于 n。所以,应该取最小的一个值#include #i...
分类:
其他好文 时间:
2014-09-06 17:21:53
阅读次数:
158
Jack Straws
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 3155
Accepted: 1418
Description
In the game of Jack Straws, a number of plastic or wooden "straws...
分类:
其他好文 时间:
2014-09-06 14:53:53
阅读次数:
270
js 数据类型 undefined 未定义boolean 布尔值string 字符串number 数值object 对象后者null;function 函数数字转化Number(); parseInt(); parseFloat(); 可以把非数字转化成数字Number();...
分类:
Web程序 时间:
2014-09-06 13:38:33
阅读次数:
194
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then le...
分类:
其他好文 时间:
2014-09-06 12:20:23
阅读次数:
171
原文:05. 取SQL分组中的某几行数据对表中数据分组,有时只需要某列的聚合值;有时却需要返回整行数据,常用的方法有:子查询、ROW_NUMBER、APPLY,总体感觉还是ROW_NUMBER比较直观。测试数据: if OBJECT_ID('testGroup') is not null
drop ...
分类:
数据库 时间:
2014-09-06 12:10:43
阅读次数:
353
We have a sequence of N positive integers: a[0] through a[N-1]. You do not know these integers. All you know is the number of trailing zeros in their ...
分类:
其他好文 时间:
2014-09-05 22:21:12
阅读次数:
367
HDU 1266 Reverse Number(字符串逆转 水题)...
分类:
其他好文 时间:
2014-09-05 19:58:01
阅读次数:
163
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each numb...
分类:
其他好文 时间:
2014-09-05 17:35:41
阅读次数:
227