Confused on what a challenge is asking?
-
- Posts: 273
- Joined: Thu Apr 10, 2008 9:47 pm
It's good that you're asking, because I have a problem with the following challenge:
"In the first million digits, what's the longest repeated sequence?"
What is a "repeated sequence" per your definition? Is 123123 one or does it have to be something like 55555? In other words, does the "cycle length" need to be exactly one?
As a general rule, in challenges like this where the wording is not there to give hints but only to describe the problem, please be more formal about your specification. There are many more instances of challenges where you can kind of guess what's being asked of you by using common sense, but actually the question is missing some information to make it water tight.
"In the first million digits, what's the longest repeated sequence?"
What is a "repeated sequence" per your definition? Is 123123 one or does it have to be something like 55555? In other words, does the "cycle length" need to be exactly one?
As a general rule, in challenges like this where the wording is not there to give hints but only to describe the problem, please be more formal about your specification. There are many more instances of challenges where you can kind of guess what's being asked of you by using common sense, but actually the question is missing some information to make it water tight.
-
- Posts: 61
- Joined: Wed Apr 30, 2008 3:31 am
[quote="sigi"]It's good that you're asking, because I have a problem with the following challenge:
"In the first million digits, what's the longest repeated sequence?"
What is a "repeated sequence" per your definition? Is 123123 one or does it have to be something like 55555? In other words, does the "cycle length" need to be exactly one?
As a general rule, in challenges like this where the wording is not there to give hints but only to describe the problem, please be more formal about your specification. There are many more instances of challenges where you can kind of guess what's being asked of you by using common sense, but actually the question is missing some information to make it water tight.[/quote]
Repeated sequence is not the same as sequences of repeated digits, I think in this the challenge description is quite precise. I asked the question before if the sequence can be overlapping - like in your example "55555" has "5555" as longest repeating sequence. Well, when I solved it I realized that it actually doesn't matter.
"In the first million digits, what's the longest repeated sequence?"
What is a "repeated sequence" per your definition? Is 123123 one or does it have to be something like 55555? In other words, does the "cycle length" need to be exactly one?
As a general rule, in challenges like this where the wording is not there to give hints but only to describe the problem, please be more formal about your specification. There are many more instances of challenges where you can kind of guess what's being asked of you by using common sense, but actually the question is missing some information to make it water tight.[/quote]
Repeated sequence is not the same as sequences of repeated digits, I think in this the challenge description is quite precise. I asked the question before if the sequence can be overlapping - like in your example "55555" has "5555" as longest repeating sequence. Well, when I solved it I realized that it actually doesn't matter.
-
- Posts: 61
- Joined: Wed Apr 30, 2008 3:31 am
Labyrinth problem
I think I have coded it right but I am getting "failed to run correctly"
I saved the test maze html page and converted it into memory init file and my HVM code solves it ok in python HVM.
It takes about 25000 cycles. Is the limit still 40000 ?
I saved the test maze html page and converted it into memory init file and my HVM code solves it ok in python HVM.
It takes about 25000 cycles. Is the limit still 40000 ?
-
- Posts: 61
- Joined: Wed Apr 30, 2008 3:31 am
From bottom left to upper right.gfoot wrote:Make sure you get the right corner to start at (I got it wrong...)
I tested it with simple 23,23,0 and with one on the screen and test maze #1. I can trace the output and it is solution for the maze. The error message is different - "failed to run correctly" sounds more like it is not a valid code but it is.
Ok, I think I figured what the problem is . On one of the mazes it does hit 40000 limit. Better compile with -O3 now...
-
- Posts: 17
- Joined: Mon Jan 26, 2009 10:02 pm
Can some one explain this for me please, by my working the answer should be 24 not 26, is there something im missing?
"I have a special piece of text that represents a specific value. Here's how I calculate it:
# Start reading left to right
# If a character is a digit, I add it to my sum
# If it's an 'x', I remove it and go left two places
# Continue until I hit the end of the string
For example, the string '123x456' has a value of 26."
"I have a special piece of text that represents a specific value. Here's how I calculate it:
# Start reading left to right
# If a character is a digit, I add it to my sum
# If it's an 'x', I remove it and go left two places
# Continue until I hit the end of the string
For example, the string '123x456' has a value of 26."
Code: Select all
123x456 sum:1
^
123x456 sum:3
^
123x456 sum:6
^
123x456 sum:6
^
123 456 sum:8
^
123 456 sum:11
^
123 456 sum:15
^
123 456 sum:20
^
123 456 sum:26
^