func main() { prod := bigint.BigInt{[]int{1}} for i := 0; i < 1000; i++ { prod.Mult(2) } println(prod.DigitSum()) }
func main() { num1 := bigint.BigInt{[]int{1}} num2 := num1.Copy() var index int for index = 2; len(num1.String()) < 1000; index++ { tmp := num1.Copy() num1.Add(num2) num2 = tmp } println(index) }
func main() { fact := bigint.BigInt{[]int{1}} for i := 1; i <= 100; i++ { fact.Mult(i) } println(fact.String()) println(fact.DigitSum()) }