Problem 497: Easy problem. It had been nearly two years for me to solve a unsolved problem. 30 seconds in Python.
1.5 seconds in Go. Struggled with integer overflow.
Saturday, October 11, 2014
Saturday, September 27, 2014
I have been looking for a replacement for the C language. I like its speed but it does not have some important data structures such as list and associative array. I feel C++ and Java are somewhat ugly. I read a little bit of the code of docker by chance, which is written in the go language, then I thought it looks good to learn.
So I read through "An introduction to Programming in Go", I actually bought the book for Kindle, and I went through from the problem 1 to 7 of Project Euler. This is not the first time for me to use the language, but I think the command was little different when I used it 4 years ago. Did it have "go run" option? Anyway I learned how to create a package today. I put my functions like Gcd and Is_prime in my new package. I needed to struggle with GOPATH value but the package is working now.
Saturday, June 07, 2014
Sunday, June 01, 2014
Friday, May 02, 2014
Thursday, May 01, 2014
Problem 44: Pentagon numbers. I actually read the forum and learned. 3 seconds in Haskell.
Problem 45: Triangular, pentagonal and hexagonal. 3 minutes in Haskell.
Problem 46: Goldbach"s other conjecture. Less than a second with one line in Haskell.