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