基本数据类型 Python有五个标准的数据类型: Numbers(数字) String(字符串) List(列表) Tuple(元组) Dictionary(字典) shell好像无明显的数据类型区分 Python支持四种不同的数值类型: int(有符号整型...
分类:
编程语言 时间:
2014-11-05 15:12:42
阅读次数:
206
Description
The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu...
分类:
其他好文 时间:
2014-11-05 00:33:10
阅读次数:
200
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given
1->2->3->3->4->4->5, return
1->2->5.
Given
1...
分类:
其他好文 时间:
2014-11-04 22:55:40
阅读次数:
300
题目来源
北大ACM,题目ID 1002,难度 初级。
题目简介
Description
Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phr...
分类:
其他好文 时间:
2014-11-04 22:46:52
阅读次数:
431
题目描述:
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],
...
分类:
其他好文 时间:
2014-11-04 19:41:37
阅读次数:
205
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]...
分类:
其他好文 时间:
2014-11-04 17:28:35
阅读次数:
283
// 设置无下划线超链接 start
String textStr = "13771839951;021-12345678";
text.setAutoLinkMask(Linkify.PHONE_NUMBERS);
text.setText(textStr);
Spannable s = (Spannable) text.getText();
s.setSpan(new UnderlineSpa...
分类:
其他好文 时间:
2014-11-04 15:05:53
阅读次数:
164
The binomial coefficient C(m,n) is defined as
m!
C(m,n) = --------
n!(m-n)!
Given four natural numbers p, q,
r, and s, compute the the result of dividing C(p,q) by
C(r,s...
分类:
其他好文 时间:
2014-11-03 22:40:24
阅读次数:
200
题目:Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not poss...
分类:
其他好文 时间:
2014-11-02 22:12:23
阅读次数:
146
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-11-02 13:41:39
阅读次数:
168