Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

series, largest-series-product: clarify "consecutive" #200

Merged
merged 1 commit into from
Mar 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions largest-series-product.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
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 example, for the input `'1027839564'`, the largest product for a
series of 3 digits is 270 (9 * 5 * 6), and the largest product for a
series of 5 digits is 7560 (7 * 8 * 3 * 9 * 5).

Note that these series are only required to occupy *adjacent positions*
in the input; the digits need not be *numerically consecutive*.

For the input `'73167176531330624919225119674426574742355349194934'`,
the largest product for a series of 6 digits is 23520.
2 changes: 1 addition & 1 deletion largest-series-product.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
blurb: "Write a program that, when given a string of digits, can calculate the largest product for a series of consecutive digits of length n."
blurb: "Write a program that, when given a string of digits, can calculate the largest product for a contiguous substring of digits of length n."
source: "A variation on Problem 8 at Project Euler"
source_url: "http://projecteuler.net/problem=8"
15 changes: 9 additions & 6 deletions series.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
For example, the string "01234" has the following 3-digit series:
For example, the string "49142" has the following 3-digit series:

- 012
- 123
- 234
- 491
- 914
- 142

And the following 4-digit series:

- 0123
- 1234
- 4914
- 9142

And if you ask for a 6-digit series from a 5-digit string, you deserve
whatever you get.

Note that these series are only required to occupy *adjacent positions*
in the input; the digits need not be *numerically consecutive*.
2 changes: 1 addition & 1 deletion series.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
blurb: "Write a program that will take a string of digits and give you all the possible consecutive number series of length `n` in that string."
blurb: "Write a program that will take a string of digits and give you all the contiguous substrings of length `n` in that string."
source: "A subset of the Problem 8 at Project Euler"
source_url: "http://projecteuler.net/problem=8"