If multiple transformation rules yield identical output states, do not remove duplicates.
If you don't remove duplicates then
'MUUUI'-> ['MUUUIU', 'MUUUIUUUI', 'MUI', 'MUI']
but tests expect
'MUUUI'-> ['MUUUIU', 'MUUUIUUUI', 'MUI']
If you mean "keep duplicates from different rules, but drop duplicates from multiple application of the same rule", it should be stated clearly in description and tested. All current valid solutions drop all duplicates.
In python
bus_times
andboy_times
should be tuples.The function should return a set of tuples.
Now works.
Random tests generate strings with
'x'
instead of'+'
Wrong reference soluition, e.g.:
This comment is hidden because it contains spoiler information about the solution
fractions
should be allowed. Args and result should be of typeFraction
.I don't consider the simple version a duplicate (unless there is already a kata about rational lcm).
Python has integer lcm. Rational lcm requires a couple of lines of code in addition to imports.
5 people solved it without the random tests, and now the solutions are invalidated.
There is only one valid solution, and it contains this comment:
Use proper type (
Fraction
) for input/output and remove restrictions.IMHO without strings and restrictions this can be a good 7kyu kata.
There isn't much space for a yellow/purple rational lcm from scratch since there are already:
and it would be mostly a duplicate.
Reference solution in wrong (~ 20% wrong results). E.g.:
but
157/3
is not a multiple of136/204
(=2/3
).str
,tuple
,itertools
, ... doesn't make sense.If you don't remove duplicates then
but tests expect
If you mean "keep duplicates from different rules, but drop duplicates from multiple application of the same rule", it should be stated clearly in description and tested. All current valid solutions drop all duplicates.
.
No random tests.
Loading more items...