Ad
  • Custom User Avatar

    Thank you. This works!

  • Custom User Avatar

    When there are no g-step primes PowerShell returns "" (empty string). I modified the tests so you can see in "Sample Tests" such an example of return; moreover I added some printing so you can see clearly what is expected and what is your answer. Hope that will help you. Cheers!

  • Custom User Avatar

    Hi,

    I am having the following issue:

    Expected: {}
    But was: {}

    Data type for $expect is System.String

    I have this code:

    if ($res -ne $null) {return $res} else {return ""}

    I am not sure what to return?
    I have tried the following but nothing works:
    '', ` `, "", " ", $null, @(), @{}

    Why is my output not matching the $expect output?

    Languange: PowerShell

  • Custom User Avatar

    I figured it out: If empty, return ""

  • Custom User Avatar

    Hi, please help with the below:

    Tests:
    
    1 250
    Expect: ((1, 1), (42, 2500), (246, 84100))
    250 300
    Expect:((287, 84100))
    300 350
    Expect:
    
    1823 2144
    Expect:((1880, 4884100))
    1057 1197
    Expect:
    
    Expected: {}
    But was:  {}
    
    Expected: {}
    But was:  {}
    

    I am returning $null or just an empty array for those two cases.
    Thanks!

  • Custom User Avatar

    Noted. Thank you for your help!

  • Custom User Avatar

    When two people have the same winning number sort them alphabetically by their firstnames.

    The alphabetical order is ascending, so E goes before J, and the 8th in the list is James.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    In this solution the type of the return is not the good one.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Make you code faster, codewars is much slower than your local machine :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Could you please advise if this is possible to do before timeout(12s) in PowerShell? Thank you

  • Custom User Avatar

    Without the input, how can we (or you) know your results are ok? Print the input: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution

  • Loading more items...