最新文章列表

Project Euler p12 - Highly divisible triangular number

  http://projecteuler.net/problem=12   求因数个数大于500的数, 关键在于下面两个隐藏的条件 triangle(i)=i*(i+1)/2 divisors(a*b)=divisors(a)*divisors(b)   countDivisors 其实它还可以优化成递归求解, 而不是一个个去数, 不过量不大, 就算了.   765765 ...
mysh 评论(0) 有896人浏览 2013-10-08 17:54

Project Euler p14 - Longest Collatz sequence

发现一个好玩的站, 没事刷刷题 http://projecteuler.net/problem=14   找一百万以内的最大起始数, 一个个数过去就好了, 用上DP, 45ms   @Test public void t2() { final int R = 1_000_001; int[] record = new int[R]; record[1] = 1; ...
mysh 评论(0) 有1763人浏览 2013-10-08 17:32

Problem25

package com.yao.Algorithms; import java.math.BigInteger; /** * * @author shuimuqinghua77 @date 2012-4-26下午02:33:04 * */ public class Problem25 { public static void main(String[] args) ...
水木清华77 评论(0) 有887人浏览 2012-04-26 16:33

Problem24

package com.yao.Algorithms; import java.util.ArrayList; import java.util.List; /** * * @author shuimuqinghua77 @date 2012-4-26下午02:01:16 * */ public class Problem24 { /** * 存放数字 */ ...
水木清华77 评论(0) 有786人浏览 2012-04-26 14:12

Problem21

Problem 21 05 July 2002 Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a b, then a and b are an amicable ...
水木清华77 评论(0) 有1208人浏览 2012-03-11 20:44

Project Euler Problem 75

It turns out that 12 cm is the smallest length of wire that can be bent to form an integer sided right angle triangle in exactly one way, but there are many more examples. 12 cm: (3,4,5) 24 cm: (6,8,1 ...
OpenMind 评论(0) 有1327人浏览 2012-01-02 18:18

Problem20

package com.yao.shuimu.euler; import java.util.ArrayList; import java.util.List; /** * Created by IntelliJ IDEA. * User: shuimuqinghua77 * Date: 11-12-15 * Time: 下午1:25 */ public clas ...
水木清华77 评论(0) 有806人浏览 2011-12-15 14:09

最近博客热门TAG

Java(141747) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54918) .net(54785) Web(54513) 工作(54116) Linux(50906) Oracle(49876) 应用服务器(43288) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37268) 数据结构(36423)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics