6 kyu
The lost beginning
349 of 787CatPlusPlus
Loading description...
Fundamentals
Algorithms
Strings
Mathematics
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
I found this kata to be very satisfying.
The problem is really simple but the solution isn't. At least not until it hits you.
Also, the idea of using the iterator in the string method was new to me, so this kata made me think "outside the box".
Thanks to the creator of this kata!
thanks for the inspiration for new exploits :)
Nice task. I consider it as first task to remember. And because I liked it I believe to stay here at Codewars to solve other tasks...
About task. I liked that it has so many issues to solve. I solved it only by iteratble procces of eliminating errors with a lot of conditions. And I was shocked to see the best solution - how simple it is. Nevertheless I've got it only after couple iterations in debugging )
It was like in math - best solution occured to be a proof out of contradiction.
Thank you, I really appreciate it.
I changed the description of the kata, as quite a large number of people did not understand it. Could you comment on the readability of the kata and suggest new ideas for refining the condition
Thanks! The description is now much clearer.
Solutions that ignore the
Numbers will never be truncated
part of the description (such as mine) may pass.Thanks to @crringe for spotting this and @JohanWiltink for finding and edge case (91).
Python fork: https://www.codewars.com/kumite/65b664eb8ee05703817e69b7
Maximum string length should go back to
140
.I would really rather fix all problems at once, instead of creating a patchwork of band-aids ( if lost in translation: make it right once, not iteratively. solving one problem at a time means every next fix might create a new problem ).
the desired extreme case was another sequence, there are plenty of them here, I think we need to change the random tests so that they include this , but I haven't fully thought about it yet
It's just that this is not only a python problem and updating all translations is quite a painstaking task.
I don't see any active issues though... Are there more problems?
Was it ever 140? Last week, it was 139 ;)
I swear it was, but there were problems with the translation into C and the line length exceeded 140, I would be glad if someone looked at all the translations for errors, but so far this kata has turned into legacy code :)
fixed
This description is incredibly unclear. How are we supposed to know if the input string can be split into single digits or two digits or not split at all?
"123" -> [1, 2, 3] -> 1 "1234567891" -> [1234567891] -> 1234567891
There's no explanation of why the two examples above are being split up differently.
Did you read
? The string isn't split up into digits, it's split up into numbers.
Not a kata issue. Closing.
Its easy to understand if you think of it like that: for '123' next number would be 4; for '1234567891' next number would be 1234567892; and so on
I will try to ask you to reconsider the condition again, but it would be much better if someone offered their version of the condition, otherwise we will just look for a needle in a haystack of a good solution.
How to reconcile this in the description?
Size limit says:
0 < smallest number < 1 000 000 000
But the example says:
"1234567891" -> [1234567891] -> 1234567891
But
1 234 567 891
exceeds the "smallest number" limit (??)yes, you are right, and in trying to get rid of the wrong decision, I forgot about my own conditions of the game. The problem will be resolved as soon as possible.
IMO kata should return -1 if there is no solution within limits.
And include boundary test cases like:
No, the limits should be enforced. They used to be
0 < length string < 140
and1 < number < 1e9
, and input validation used to be unnecessary. Test suites should test correctly.test("1e9") -> -1
would add integer overflow issues, but in the logic would only add an extra check at the end. That would not make the kata better.This comment has been hidden.
So is this a case that you want to replace another case, or is it a case you want added? I didn't quite understand the wording
This comment has been hidden.
Okay. Added in this C++ fork.
thank you very much
Added to Scala and CoffeeScript.
This test is out of bounds. And you can't just go changing the bound, because people rely on those bounds, and they interact with each other.
a thousand apologies, I was analyzing the solutions on patton and noticed an opportunity to bypass the tests, it was decided to add a new test case, but I forgot about my own rules. Please replace the text with 123456781. Once again, I apologize for your wasted time:(
Well, or I'll have to leave int, which many people won't like.
123456781
is not useful as an edge case.91
is useful. The point is to truncate a multi-digit number in a correct consecutive sequence.And no, it's unnecessary to leave
int
, and we should not do that.In C, I started by converting each character to its 1-digit number and storing them in an array of 140
int
(and counting them in the same pass) because the description states:After my solution mostly worked, it still consistently crashed with signal 11, always in the test group
up_to_30_medium_numbers
, until I increased that array size to 149. I put it at 150 because it's a nice round number, and now I can see that is exactly large enough. That test randomly generates up to 30 * 5-digit numbers, contradicting the description.I would add a line to
random_test()
just after preparation ofnum
andlen
:while (num * len >= 140) --num;
or similar.as a short-term fix for the problem, I can change the condition, but the test cases in C have been checked for a long time, I think there should be no errors in them. Anyway, thanks a lot for your cooperation
the condition has been changed
Changing the requirements was the wrong solution. Test suites should not take more than
20
consecutive numbers to concatenate, and if the first number is< 1e7
, the string would have been< 140
characters.The C test suite broke the kata. This is why you have to document the internal requirements of your test suite, and check that translations do not break them before approving.
That leads right back to the other thing I noticed, but I somehow convinced myself it wasn't a problem or it wasn't worth mentioning. The tests of
up_to_20_large_numbers
generate up to 20 * 7-digit numbers, which in the rarest case will equal 140 characters, and that also contradicts the description-- "n < 140". This is why I wrote(num * len >= 140)
and not(num * len > 140)
, and I forget whether or not I had already realized that it would fix both cases. I remember thinking that since the highest number to come out ofn % 1000000
is999999
(six digits) that it would be good; then I noticed thatrandom_test()
adds 1 to that, to shift the range ofnum
from[0, max_num - 1]
to[1, max_num]
. So we're back up to 7 digits, even if only rarely, and the problem remains.On the side,
1e7
is an 8-digit number, son < 1e7
is much more easily another 7-digit number (90% of them), andrandom_test()
using up to 20 of them would exceed the limit far more often. I guess you meant< 1e6
, as the listing of 20 consecutive numbers starting at1e6 - 1
uses 139 digits.This comment has been hidden.
I see there really is a problem with the C++ translation, but unfortunately I am not competent in it, could you please give your opinion why that code does not give errors, otherwise I will not be able to help in any way
I'm not certain about other solutions, but in the mentioned solution by 'lklkleo,' I encountered (it seems) an error where, with higher values of controlled integers, there could be an attempt to convert a string to an integer without the possibility of a successful conversion (see the line: int start = std::stoi(str.substr(0, i));).
If the compiler tried to convert, for example, the value "99999999999" using the stoi() function, it exceeds the maximum value of an 'int,' and the compiler should detect and terminate the program. Therefore, I believe either the server-side compiler does not treat this as an error, and it was fortunate that the results for tests with such large numbers were always the string 'str' (meaning the tests did not expose this error), or the tests are not comprehensive. Personally, I would lean toward the first possibility, but I'm not certain because I don't know the specifics of the written tests.
everything seems to understand your question, last time I was too inattentive, the problem says that all numbers lie in the int range , and no exceptions need to be solved
Hello. I'm the one who translated it into C++. Is your issue that the tests don't cover cases where "broken" sequences would overflow
INT_MAX
? If that's what you mean, then that's by design. The constraints in the problem description state that no integer is larger than 1'000'000'000 (much lower than INT_MAX). If that is your issue, then this isn't an issue at all. This is the specification of the Kata and is followed by all the translations I've seen.Go there, I don't know where to take it, I don't know what
hello, I apologize for your dissatisfaction, but I do not quite understand what the problem is, could you explain in more detail which parts of the description you did not understand?
No need to apologize, this is my confusion, it may well be clear for others!
For me as a native English speaker, the description is clear enough to an extent. However, the examples are where the confusion lies, For example, you have provided this:
"Given a sequence of one or more 'consecutive natural numbers' concatenated into a string, return the smallest possible first number in the sequence."
"91011" -> [9, 10, 11] -> 9
Under which premise is this not [9,0,1,1] as a sequence? Both 1 and 9 are natural numbers with 1 being the smallest. However you have stated "smallest possible first number" Im not sure what you mean here, the smallest natural number or the first natural number of the sequence.
Given:
"121122123" -> [121, 122, 123] -> 121
Its not clear how you are choosing to group these numbers, there is no pattern here why is this not [1,2,1,1,2,2,1,2,3] or [12,11,22,12,3] ?
Of course this is my own confusion here, but I am struggling to follow how the challenge text and the examples fit together. The tests do not really help much in this case either.
Please note these examples are taken from your description, they are not mine
the description says that this is a sequence of consecutive numbers, and the numbers are natural, your interpretation destroys the sequence itself, and since your examples have a deviation modulus above one, they lose the very fact of a series of natural numbers, since in the series of natural numbers the deviation = 1
after a long discussion in discord, the community unanimously came to the conclusion that the condition does not require improvements
OK, thank you
it seems to me that an important fragment of the condition was missed, the numbers must be consecutive , and the sequence of natural numbers is x , x+1 , x+2 and so on
The description is very unclear, for many it needs far more details, as it appears there is some alleged grouping of numbers, yet the limits dont give any clear explanation of wat is expected.
hello, I apologize for your dissatisfaction, but I do not quite understand what the problem is, could you explain in more detail which parts of the description you did not understand?
but at the same time, the description clearly states that the description contains a sequence of natural numbers, it also indicates that the numbers are not cut off, from my point of view this is an exhaustive description of the problem, in case of misunderstanding, multiple examples are provided
explaining for you, this is a sequence of numbers starting from n and continuing in steps of 1, however, you need to understand that understanding the condition of the problem is also important, since a detailed condition in your understanding will cut off the scope for creativity and actually provide a ready-made solution to the problem, which from my point of view would be highly undesirable
Whilst I thank you for that edicational aside, I feel you have somewhat failed to grasp the scope of my confusion. It was nothing to do with any such pedagogical issues, it was entiely a communicative and semantic problem. The challenge problem was clear and precise, however, again in my opinion, I felt that the approach was rather obscured in the description, this is the core of my issue, and makes no assumptions about creativity or any such facet, merely a slight obfuscation due to language.
I have gone through te examples ans solutions, having forefitted the challenge, and now understand it better. My issue was not personal in the slightest, though you appear to have taken some issue with it form the rather defensive nature of your reply. This was certainly not my intention. I merely provided an opinion on my reading of the challenge.
well , I understand you , I will try to raise the question again , if it doesn't bother you and you have already solved the problem , could you suggest a new condition for it , it would be much more convenient , I will try to supplement the condition with your example . Thank you in advance for such great assistance to kata
I dont have an example, as I mentioned previously these are merely rhetorical queries, not examples, I suggest it remains the same for now, as there are a number of comments here which are abvle to provide clarity.
C translation
approved by someone
C++ Translation.
To be honest, I can't read the tests (
Can't read as in what?
thanks a lot for the translation, I'm just really bad at c++ and it took me quite a long time to realize that it should be working
I can't mark the sentence as resolved
. (I forked the translation an hour ago to improve on something; awaiting a C++ reviewer to approve that one)
Rust translation
Thanks for the translation
Remember to resolve suggestions after approving translations!
Out of curiousity: are approaches that rely on mathematically guessing the number of fittings going to fail for certain types of inputs where the inner numbers' lengths change in a particular way (like
str(int(''.join(map(str, islice(count(0), 1001))) + '1'))
(starts out at single digits, then double, then triple, then quadruple, then ends with an out-of-place single digit). I tested some answers here on this one and some seem to return1
instead of the entire number.I don't fully understand your question, but keep in mind that in some solutions the logic may depend on the limits specifications. I wouldn't expect this for Python, but JS solutions may depend on the result fiting in
Number
( integers are limited to53
bits ), and Haskell solutions ..Int
( ..64
bits ). The limits were explicitly specified to guarantee this.I think they are asking about inputs like
'891011'
, where the sequence crosses a power of 10 border.Yes, pretty much what Kayleigh's understood. I did some more tests and found that trying to estimate the length of the string based on the starting number can be more inaccurate than bruteforce for very fringe cases. It's counterintuitive tho lol
LC translation
this translation modifies the description ( don't worry, LC always does that; it requires additional specifications other languages don't )
Scala translation
I completely trust you)
Remember to click the
Mark suggestion as resolved
checkbox.Alas, I'm not that cool, codewars doesn't trust me.
That sounds like a bug?
I guess I misunderstood you a little bit.
Thank you so much! I just made a change to get rid of the
std::bind
s because they weren't giving me the amount of randomness I want. Can you just approve the latest fork?Wait for a c++ reviewer tbh.
No idea why the reply went under this comment and not the other one. Sorry for that
CoffeeScript translation
I completely trust you)
Fork with hopefully clarified description
Any feedback appreciated.
Approved after discussions on discord.
Java translation
thank you very much
Approved by author.
Sorry, i simple don´t understand the kata. What should I do? The description says we should find the smalllest number, but the smallest number is always a mono numeric number. I know i lost something in the description, but I don´t know what, maybe its in the translation to my language, but really I don´t know what do you want. Sorry In the other hand, thanks for making katas for people like me.
Thank you very much for your criticism, I will try to correct the condition. Explaining in more detail to kata, there is a sequence of natural numbers starting with some unknown number . (the numbers go in a row) you need to find the smallest number that will fit this condition , it is guaranteed to exist
Ok, ok. Now I understand. I will try it. Thanks again.
You're welcome, your question is very useful , you opened my eyes to some understatement of the description, I'll try to fix it
Fork with new description which may be better
Nice, Kata. Just done, made me think a little bit. And thanks for changing the description. Continue your work you´re making it very well. Thanks again.
If anyone has any suggestions for kata or a desire for translation into another language, I would be very grateful :)
Haskell translation
when? I knew that people with your rank are cool, but not by the same amount)
sorry, it turns out I don't know how to approve translations, I'm going to read about it)
hit the "approve" button
"Description cannot be approved, recent changes from related record must be merged first."
I'll fix that. The description was changed between the moment I started the translation and the moment I published it, and you get that message.
The description cannot be approved. First, you need to merge recent changes from the linked record.
I don't know how to measure branches), in any case, I haven't had such an experience yet and it's pretty scary to ruin your work
Try this one
Do note I changed the description. Approve only if you agree with my changes.
Hooray , now I have a translation into a language that I have never heard of ) , and this probably only exists in very popular kata
yes, but it's strange that you can't change the description, your previous description was more beautiful, but I remembered it, so I'll change it myself
I did change your description.
thanks )
can I ask you a question, you won't leave me after the publication of the kata)) I'm scared
Nobody expects you to support translations to languages you don't know. But even if or when I'm not here, there will be people to help you with that.
That said, I probably won't be going away anytime soon.
thank you very much
I misread. This generates numbers of
10
digits, which can go up to9 999 999 999
. You needs[:9]
.Yes, you're right, it looks like I was sooooo sleepy)
you can also ask a question, is there a person who solved this kata first and gave a negative review , while his decision was not visible , can I somehow ask him to re-evaluate the kata so that the satisfaction rating is 100% ?
You can, you did, he didn't. That's the risk of prematurely publishing a kata. It should really be as perfect as possible when publishing, and you didn't have the experience for that when you first published. Let it go.
95% is not bad at all.
There is not any way to ask them. They might come back on their own and re-evaluate, or they might have already re-evaluated and decided they do not like the kata. No kata can be perfect for everyone. And your kata is well above the approval threshold of 80% so there isnt any reason to worry about it anyway.
Well)
or you can clarify, as an expert in everything on codewars, kata in this state will require even longer processing, I'm just not very familiar with the process of translating kata into other languages and have little idea what kind of material should be prepared for this
I don't want to translate other people's kata to gain experience, I feel sorry for those people to whom I will translate)))
Votes are anonymous, and many users prefer it this way. I wouldn't try to find out who voted what and why. If several users have downvoted your kata, you could make a public comment asking for general feedback about the kata. You can also drop by Discord and discuss your kata (in progress) there with active members.
I understood , well , I have no questions left , everything is really democratic here
The biased random generator ( the one that appends
s[:u]
) generates inputs that breaknum < 2_000_000
.Yes, writing biased random generators correctly is hard.
I'd sugest to just remove that constraint from the description. It's not important anyway.
It is important for translations. Without it, the kata requires arbitrary precision integers. These can be transparent in Python, but have to be explicit in other languages.
hmm, it seems to me that if you remove the restrictions from the condition, then everything will be fine) in any case, I do not know how to do it differently, you can just generate sequences of up to 7 characters , but it will be quite small
but you're right, in other languages, numbers really should be set in advance , do you think maybe we'll increase them to 128 bits and the problem will be partially solved ?
the error has been fixed
If you can't limit it to 32 bits, you might as well specify arbitrary precision.
OK,
num
is limited to 30 bits ( which is good, that'll fit signed 32-bit ), andlength s
is limited to something that clarifies the performance requirements. Both generators obey both restrictions. That seems solved then.I'm sorry, I understand that the solution is not the best, but I just didn't want to go beyond int, as it could be inconvenient for people who don't really like to read the terms)))
This is a much easier version of this kata ;-)
I couldn't solve that kata, so I decided to write my own)))
maybe you could add a link to the harder one in the description of your kata
I'm afraid we don't have much in common, besides, it's more likely to disappoint those who decide to kata) too much difficulty, but why do you think it's worth it?
It could be a nice way to introduce people to that kata, by first trying your kata. If you want, I'll update that one and link to your kata, to give users a chance to try your kata first.
it seems to me then that there should be a reference to this in that kata , and not the other way around.
If people like this kata, and solved it, they have a shot at the harder one. It's not mentioned in Similar kata, so you'd have to link it in the description.
BUT
please don't change the description now, or we'll have the same problem with the JS translation as with the Haskell one. Please change the description after approving the upcoming JS translation ( it shouldn't take more than about 15 minutes ). Or I could add a link in the JS translation description.
in my defense, I will say that I did not solve that kata and I have little idea of its solution, how much time do you think it will take me ? I just would like to understand which kata I am referring to
and thank you so much for helping with translations.
however, my fate is completely in your hands, and I will solve such a thing for at least a week)
temporary issue to avoid prematured approval
And good night. ;)
Probably thanks... Although I'm not really sure that this is not a joke)))
good night)
Not a joke ~ instead, a precaution (it's a valid move).
If you are not asleep, of course, and I did not ask your time zone, then I woke up :)
understood rowcased thanks for clarifying
In any case, if I don't bother anyone, then I'm ready for publication, I just have time to debug now and I'd also like to know who left a negative review, since it was back when the kata didn't work in principle and I think he wouldn't mind running away with it Now that such a large amount of work has been done
.
to be honest, I still did not understand when it would be published, but thank you very much for letting me sleep)
Sorry. I'm distracting you , but could you point out the problems in this kata , or the points that could be improved , I can't find
I don't see much.
for s in arr: ...
)str.join
. Currently you're using string concatenation, which isO(m*n)
whilejoin
makes itO(n)
. You won't see a difference here, but it's still an anti-pattern. =>s = "".join(str(num + i) for i in range(repeat))
Needs (a) fixed test(s) which would fit a lower number with a truncated last number in the string, eg.
This currently relies on random tests, which do not always generate cases that catch this bug ( which my Python solution has ).
I will check the code, but truncated sequences should not exist in this task.
if I'm not mistaken, everything should work correctly (at least with the title code )
if I understood you correctly, the code always returns the minimum number at which the sequence will not be cut , but my English is lame in all plans, so I don't understand something
God, I'm an idiot, I'll do it now)
everything is ready, how can I delete my comments and get rid of this shame)
Don't be too hard on yourself - I found out the hard way. :P
Good :)
however, you did not remove the problem, I would venture to assume that I did something wrong after all
I would prefer the extra tests to be under a separate
it
header "edge cases". But this solves the issue.Well, now I understand what's wrong)))
I had not yet resolved the issue, no - I was still busy figuring things out. Don't expect action in seconds, sometimes it can take a little time.
I just put it in the condition, I think it's more convenient
I'm going to take it out in a separate test.it but it seems to me that this will only cause a lot of confusion.
sorry, I didn't understand your thought, it's too deep
I added a separate module for generating cropped numbers, but it is rather crookedly implemented (in Prague of cropping)
It seems to have done everything
For me, a section with fixed edge case tests is sufficient; you don't have to have random tests with such inputs. It leads to unrelated problems and complexity, and it makes the tests less maintainable. It's just not worth it.
Other opinions may be available.
mmmh, yes and no (crossed messages. @Johan: I disagree on this, because if the edge cases are only in the fixed tests, they can be hardcoded). You're picking randomly an input in the whole list. you should just shuffle it, then iterate over all the inputs (it actually doesn't change much, logic-wise, but the current version is a bit of an anti-pattern, coding-wise)
(
I just want to sleep.
you can push the kata to draft, to avoid a permatured approval (or open an issue) and do that later. No hurry
come on, it seems to me everything will work)))... as for shuffling, it seems to me that randomness will still be preserved, besides, on python, deletion takes O(1) and we should not lose anything in test performance
my English tells me that the translator is giving some kind of more audacious speech than it originally is )
and there is a question , aren 't you able to fix bugs yourself , you have more than 10,000 honor , and significantly , or do you have other problems
errr, as I said, logic wise, that doesn't change much, yes. It's codign-wise (maintenance point of view) that it's kinda an anti-pattern.
note: deletion?? there are no deletion in the code, as far as I can tell, and that's not what I'm asking about. Looks like you don't know about
random.shuffle
. The code will actuallybe simpler with this.edit: again, it's not a bug. Yes, I could "fix" it. But you're the author and you're active. Let's say it's part of your journey as an author. ;)
thank you, I really didn't know about this, as for editing, I'll do it tomorrow))) . I do not want to put the project in drafts , suddenly the inspector will be active at night or at other times , so I will rely on fartuna for mistakes , and thank you very much for your help
and it also seems to me that 60 messages under beta kata is not very normal, so it's probably time to stop writing to me in several messages and everything else)
although to be honest, I still did not understand by what criteria the kata are published)
Random tests need to use a reference solution.
If
num = 910, repeat = 1
should be generated, the correct result is9
, not910
.thanks a lot, I thought I had already fixed this part of the code, it's just weird that everything worked before.
I hope things didn't get any worse after my correction))) , and I would also like to ask, what is generally charged for creating and translating a kata ? (if you have any article, I would be very grateful)
Issue looks fixed.
This may be a language problem, but I do not understand "what is charged for creating and translating a kata". Surely we're not talking money, but what are we talking about?
I'm sorry, I communicate through a translator, but I can learn English)) I have already figured out what you will receive for the transfer and I want to say that this is very important to me. As for me, they give almost nothing for translations, but they are very important for kata. Thank you so much for your cooperation
Two more:
string
is the name of a python module... 'x) =>s
"72637236" => 72637236
. This way, they are language agnostic (for 95% of the languages, I guess)it seems to have fixed everything, if it doesn't bother you, you can specify when there will be a chance to publish this kata, and I could exhale that she is not in danger of retirement)))
Thank you very much for your help
the argument nmae is still
string
, as far as I can tell... => ?I swear I fixed it, it somehow worked itself out) в любом случае сейчас это должно быть исправленным
yup, all good, now...
it's strange, the initial code seems to have been changed, but I still have the old one displayed.
you need to reset the trainer to see the update there
thanks, now I understand why this button is needed)
Hi again,
str
: this a bad practice, because it's a builtin.cheers
MY GOD, I am your huge fan, I am very happy that you have solved this, I promise to deal with all this right now, I would like to thank you so much for your help on codewars, I was inspired and decided to create this task )
errr... you're welcome! 'x)
I fixed everything you asked for, if something is wrong, say I will do anything to fix it
.
Hi,
the random tests should be in a distinct
test.it
block from the fixed tests.Cheers
.
WOW ! TOP !
You need to calm down.
is it possible to file a complaint against him?
Reference solution erroneously produces single-digit answers, but only some of the time.
my God, I was too sure of the answer for my 4k, I will try to find the error as soon as possible
I fixed the problem, if it's not difficult, you can mark the problem as solved
Seems fixed
If it's not too much trouble for you, could you re-solve the kata and change your grade for it, thank you very much in advance, this is very important to me
Nice! ( Pity I don't do Python, but I may just forfeit and translate. I'd better do that after Beta though. )
The description could use an example - I think "string of natural consecutive numbers" is unambiguous, but an example would set my mind at ease I've correctly understood the input format.
thank you very much for the advice, I really appreciate it)