Ad
  • Custom User Avatar

    I have the same issue. It passes basic test but times out on the attempt test. First the basic test took like 2000+ ms but I manage with some optimasation to lower it to ~40 ms. Is that still to slow to pass the big test?

  • Custom User Avatar

    Yes it worked to change that, and the test passed. Thank you!!!

  • Custom User Avatar

    You are using list.Add([1, 2]); syntax for creating a long[]. This is a Collection expression and this language feature was introduced with C# 12. Codewars currently only supports C# 10 so you need to use a different syntax to create the array.

    You can support this Github issue to maybe prioritize an update of the language version.

  • Custom User Avatar

    I get these error messages in c#:
    src/Solution.cs(15,26): error CS1026: ) expected
    src/Solution.cs(15,32): error CS1002: ; expected
    src/Solution.cs(15,32): error CS1513: } expected
    src/Solution.cs(19,7): error CS8803: Top-level statements must precede namespace and type declarations.
    src/Solution.cs(20,3): error CS1022: Type or namespace definition, or end-of-file expected
    src/Solution.cs(21,1): error CS1022: Type or namespace definition, or end-of-file expected
    If I copy and past the code into VS it works I can run it without error. But not here