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-07-16 20:50:06
阅读次数:
137
题目:输出给定区间中,本身是素数,并且这个数的各位之和也是素数的数(称为位素数)的个数。
分析:数论。首先利用筛法,求出1000000内的所有的素数;然后在利用生成的素数表,
判断每个数是不是各位之和也是素数;再后求出从0开始到任意区间中包含位素数数的个数;
最后输出两个区间之差就是区间中的位素数的个数。
说明:达标法计算,查询输出。
#i...
分类:
其他好文 时间:
2014-07-14 11:17:54
阅读次数:
214
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-07-13 18:20:52
阅读次数:
202
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Find and list all four-digit numbers in decimal notation that have the property ...
分类:
其他好文 时间:
2014-07-13 18:17:24
阅读次数:
198
Sum
Time Limit: 2000/1000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)
SubmitStatisticNext
Problem
Problem Description
You are given an N*N digit matrix and you can get seve...
分类:
其他好文 时间:
2014-07-12 22:17:10
阅读次数:
236
Sum
Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
SubmitStatus
Problem Description
You are given an N*N digit matrix and you can get several horizontal o...
分类:
其他好文 时间:
2014-07-12 21:17:15
阅读次数:
182
J - Sum
Time Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others)
SubmitStatus
Problem Description
You are given an N*N digit matrix and you can get several horizont...
分类:
其他好文 时间:
2014-07-12 20:26:54
阅读次数:
269
前言
当序列中元素范围比较大时,就不适合使用计数排序。针对这种情况,就有了基数排序,这是一种按位排序。它仍然是以计数排序为基础。
基数排序
基数排序的基数:十进制数的基数自然是10,二进制的基数自然是2。通常有两种按位排序策略:1.高位优先法(most significant digit first,MSD):简单讲就是从高位排起。2.低位优先法(least significant digit first,LSD):它与高位优先相反,从低位排起。从排序效果上看,高位优先比较直观,但却涉及到递归的过程,故...
分类:
其他好文 时间:
2014-07-12 18:56:51
阅读次数:
225
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the Ts d...
分类:
其他好文 时间:
2014-07-09 15:35:19
阅读次数:
176
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s ...
分类:
其他好文 时间:
2014-07-08 13:34:40
阅读次数:
195