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-05-26 13:54:25
阅读次数:
282
10001st prime
Problem 7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
使用埃拉托斯特尼筛法,不懂得自行Wiki
我的py...
分类:
其他好文 时间:
2014-05-26 05:35:25
阅读次数:
248
题目一:
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Fin...
分类:
其他好文 时间:
2014-05-26 04:06:41
阅读次数:
248
简单数论题。区间减法。 1 //Accepted 0 KB 9 ms 2 #include 3
#include 4 using namespace std; 5 const int MAXN = 100005; 6 int f[MAXN]; 7 void
pre() 8 { 9 ...
分类:
其他好文 时间:
2014-05-26 02:54:57
阅读次数:
278
题目:The sum of the squares of the first ten
natural numbers is,12 + 22 + ... + 102 = 385The square of the sum of the first
ten natural numbers is,(1 + ...
分类:
其他好文 时间:
2014-05-26 02:15:16
阅读次数:
216
题目:2520 is the smallest number that can be
divided by each of the numbers from 1 to 10 without any remainder.What is the
smallest positive number that...
分类:
其他好文 时间:
2014-05-26 02:12:53
阅读次数:
167
'''
【程序61】
题目:打印出杨辉三角形(要求打印出10行如下图)
1.程序分析:
'''
if __name__ == '__main__':
a = []
for i in range(10):
a.append([])
for j in range(10):
a[i].append(0)
for i...
分类:
编程语言 时间:
2014-05-25 00:52:00
阅读次数:
436
首先,在之前,我不是一个 Python玩家,我只是一个使用者,需要即取,现在,我要认真学习和记录,正确称为一个Python的玩家。
说明,这明显不是教程,是我自己理解并记录的笔记而已。
Python有五个标准的数据类型:
Numbers(数字)String(字符串)List(列表)Tuple(元组)Dictionary(字典)
数字有四种数值类型:int,long ,float...
分类:
编程语言 时间:
2014-05-24 23:07:59
阅读次数:
387
import java.util.stream.*;
class KV{
String ch;
int id;
}
public class Test {
private static void print(String text, int offset) {
IntStream.range(0, text.length())
.mapToObj(i -> new KV(){{c...
分类:
编程语言 时间:
2014-05-24 22:09:03
阅读次数:
363
'''
【程序81】
题目:809*??=800*??+9*??+1 其中??代表的两位数,8*??的结果为两位数,9*??的结果为3位数。求??代表的两位数,及809*??后的结果。
1.程序分析:
2.程序源代码
这个程序实在是奇怪
0 = 1 :(
就写个程序而已,不去追究了
'''
a = 809
for i in range(10,100):
b = i * a + 1
...
分类:
编程语言 时间:
2014-05-24 14:15:21
阅读次数:
321