Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
to create the dictionary only once, you could write like in the kumite
Thank you, switching to C# 10 solved the problem.
Try switching between C# 10 and C# 12, one of these should work.
I will take a look later why the non-working version is available, it should not.
The solution is wrong, depending on n. I accidentally submitted it.
I can't factor the solution because I get this error message:
"Assert does not contain a definition for 'AreEqual'"
c#: in the base tests, “Expected” and “But what” are interchanged
yes, funny, there are also no invalidatet solutions for this kata.
I'm not sure how to answer this, other than to say they did.
(edit) It's been a few months since I solved this, I see your objection now. I believe I solved this assuming all shoe sizes (per foot) were distinct. Reviewing my solution, this is not a safe assumption and adding tests with duplicated sizes may aid in weeding out false positive solutions.
c#:
the function Ipow() called in TestRandomNumbers() in Test Cases (but not in Test or Attempt) doesn't seem to be correct, it raises an OverflowException if b is rather big. Could Test Cases get updated?:
This solution is displayed at the top when sorting by newest. I would just be curious how this solution could pass tests.
Looks like sample tests expect
uint
as argument, but Attempt tests expectint
. You should modify line 9static void Act(uint expected, uint n)
tostatic void Act(uint expected, int n)
, and you should raise this as an issue with the kata :Pc# 10/2024
In “Test” mode, but not in “ATTEMPT” mode, this error message
appears after reset:
tests/Fixture.cs(10,55): error CS1503: Argument 1: cannot convert from 'uint' to 'int'
Should I change the type of the argument n from int to uint?
Changing the return type to long is insufficient, but required. (unless you're really lucky with tests?)
You must also cast the long to int, as some random tests expect the overflow value.
The c# solution is currently not solvable without this realization.
CS:
I think the labeling in the error message is reversed for the following tests: RandomBig, RandomFull, RandomTestsAlmostEmpty, and RandomTestsManyShare
Example:
RandomTestsAlmostEmpty
Test Failed
Expected: null
But was: < 66, 16, 4, 55, 76, 55, 36, 5, 34, 1, 35, 57, 60, 86, 6, 12, 16, 66, 60, 26, 19, 84, 40, 66, 26, 43, 26, 60, 26, 66, 43, 23, 77, 26, 50, 23, 66, 60, 74, 88, 43, 23, 12, 38, 6, 60, 85, 43, 57, 60, 6, 38, 21, 32, 20, 50, 74, 50, 50, 16, 40, 6, 2, 79, 43, 6, 66, 83, 77, 79, 12, 66, 2, 66, 32, 43, 40, 50, 26, 79, 86, 57, 6, 21, 79, 12, 43, 36 >
㊗
This comment is hidden because it contains spoiler information about the solution
Loading more items...