1. Miki Tebeka
  2. euler

Source

euler / go / 10.go

/*
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

Find the sum of all the primes below two million.

Answer: 142913828922
*/

package main

import (
	"big"
	"fmt"
)

func main() {
	sum := int64(0)
	for i := int64(0); i < 2000000; i++ {
		if big.ProbablyPrime(big.NewInt(i), 10) {
			sum += i
		}
	}
	fmt.Println(sum)
}