exercism/go/largest-series-product/README.md

25 lines
878 B
Markdown
Raw Normal View History

2016-08-13 23:20:14 +00:00
# Largest Series Product
Write a program that, when given a string of digits, can calculate the largest product for a series of consecutive digits of length n.
For example, for the input `'0123456789'`, the largest product for a
series of 3 digits is 504 (7 * 8 * 9), and the largest product for a
series of 5 digits is 15120 (5 * 6 * 7 * 8 * 9).
For the input `'73167176531330624919225119674426574742355349194934'`,
the largest product for a series of 6 digits is 23520.
To run the tests simply run the command `go test` in the exercise directory.
If the test suite contains benchmarks, you can run these with the `-bench`
flag:
go test -bench .
For more detailed info about the Go track see the [help
page](http://help.exercism.io/getting-started-with-go.html).
## Source
A variation on Problem 8 at Project Euler [view source](http://projecteuler.net/problem=8)