Example #1
0
File: pe.go Project: Horimotsu/PEGo
/*
Solve012 solves Project Euler 012
*/
func Solve012() (ans int) {
	for i := 0; ; i++ {
		ans = peb.SumN(i)
		if peb.NumOfDivisors(ans) > 500 {
			break
		}
	}
	return
}
Example #2
0
File: pe.go Project: Horimotsu/PEGo
/*
Solve006 solves Project Euler 006
*/
func Solve006() (ans int) {
	ans = peb.SumN(100)*peb.SumN(100) - peb.SumN2(100)
	return
}