Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.
The teacher has written down the sum of multiple numbers. Pupils should ca...
分类:
其他好文 时间:
2014-07-22 23:05:53
阅读次数:
382
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-05-01 22:08:19
阅读次数:
366
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 ...
分类:
其他好文 时间:
2014-05-01 20:18:54
阅读次数:
425
题目//f(1) = 1, f(2) = 1, f(n > 2) = f(n - 1) +
f(n - 2)import java.io.*;import java.util.*;import java.math.*;public class Main
{ /** * @xqq ...
分类:
编程语言 时间:
2014-05-01 18:55:52
阅读次数:
450
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],
and [3,2,1].
分析:暂时不用...
分类:
其他好文 时间:
2014-05-01 17:06:52
阅读次数:
348
首先想到的是,将这个数进行素因子分解,得到所有的因子,然后取最大的。
首先写一个判断一个数是否是素数的方法: #judge a number whether a prime def
judgePrime(self,number,pme): if number < 2: ...
分类:
编程语言 时间:
2014-05-01 09:05:26
阅读次数:
3333
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-01 08:35:40
阅读次数:
443
这个方法太厉害了
别人的记录一下#include#include#include#include#include#include#includeusing namespace
std;#define MAX_PRIME 31700#define PRIME_NUM 3500int Primes[ P...
分类:
其他好文 时间:
2014-05-01 03:48:49
阅读次数:
276