- 博客(6)
- 收藏
- 关注
原创 Project Euler -- 欧拉题集 F#及Haskell 版 - No.9, No.10
No.9 A Pythagorean triplet is a set of three natural numbers, a b c, for which, a2 + b2 = c2 For example, 32 + 42 = 9 + 16 = 25 = 52. There exists exactly one Pythagorean triplet for which
2012-06-20 18:32:30
682
原创 Project Euler -- 欧拉题集 F#及Haskell 版 - No.7, No.8
No7. 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? Haskell: isPrime x = primeAux x 2
2012-06-20 16:39:20
777
原创 Project Euler -- 欧拉题集 F#及Haskell 版 - No.5, No.6
No5. 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 is evenly divisible by all of the numbers f
2012-06-18 15:50:23
798
原创 Project Euler -- 欧拉题集 F#(Fsharp)及Haskell 版 - No.3, No.4
No3. The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? F#: -- F#需要explicitly告知是UL (uint64_t) let biggestPrimeFactor (x:uint64)
2012-06-15 13:59:23
671
原创 Project Euler -- 欧拉题集 F#(Fsharp)及Haskell 版 - No.1, No.2
最近正在看F#, 拿Project Eular来练手。 顺便用Haskell做一遍,对比一下。 No1. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find
2012-06-14 09:53:05
819
原创 Haskell -- 用foldr表示foldl
Real World Haskell的哥仨写到foldr表示foldl时: " Understanding foldl in terms of foldr. If you want to set yourself a solid challenge, try to follow the above definition of foldl using foldr. Be warned: thi
2012-04-16 11:38:52
930
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人