本月博客排行
-
第1名
龙儿筝 -
第2名
johnsmith9th -
第3名
wy_19921005 - zysnba
- sgqt
- lemonhandsome
年度博客排行
-
第1名
宏天软件 -
第2名
青否云后端云 -
第3名
龙儿筝 - gashero
- wallimn
- vipbooks
- benladeng5225
- wy_19921005
- fantaxy025025
- qepwqnp
- e_e
- 解宜然
- zysnba
- ssydxa219
- sam123456gz
- javashop
- arpenker
- tanling8334
- kaizi1992
- xpenxpen
- gaojingsong
- wiseboyloves
- xiangjie88
- ranbuijj
- ganxueyun
- sichunli_030
- xyuma
- wangchen.ily
- jh108020
- lemonhandsome
- zxq_2017
- jbosscn
- Xeden
- luxurioust
- lzyfn123
- zhanjia
- johnsmith9th
- forestqqqq
- ajinn
- nychen2000
- wjianwei666
- hanbaohong
- daizj
- 喧嚣求静
- silverend
- mwhgJava
- kingwell.leng
- lchb139128
- lich0079
- kristy_yy
最新文章列表
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 ...
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;
...
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 ...