Ad
  • Custom User Avatar

    I seem to be getting the same errors as @wwlwwl and @Immaterial using c++. I can pass the sample tests fine but on "Attempt", I fail with :

    Time: 1936ms
    Test Results:
     sumOfDivided_Tests
    

    with a red border and a green arrow next to "SumOfDivided_Tests." If I change my code to return output + "Thing"; Then the output on "Attempt" becomes:

    Time: 1743ms Passed: 0 Failed: 2
    Test Results:
     sumOfDivided_Tests
     Fixed_Tests
    Expected: equal to (2 12)(3 27)(5 15)
    Actual: (2 12)(3 27)(5 15)Thing
     Random_Tests
     Log
     ****************** 
    Expected: equal to (2 166606)(3 131373)(5 62940)(7 88627)(11 37455)(13 55523)(17 19669)(19 34181)(41 34973)(43 215)(61 31903)(83 18592)(89 19669)(103 20600)(107 11663)(109 11663)(151 12231)(197 35854)(227 37455)(257 48059)(383 10341)(467 4670)(523 31903)(853 34973)(4337 13011)(4373 8746)(4507 9014)(4561 9122)(4691 28146)(4733 18932)(4967 -39736)(5437 16311)(9697 38788)(37547 37547)
    Actual: (2 166606)(3 131373)(5 62940)(7 88627)(11 37455)(13 55523)(17 19669)(19 34181)(41 34973)(43 215)(61 31903)(83 18592)(89 19669)(103 20600)(107 11663)(109 11663)(151 12231)(197 35854)(227 37455)(257 48059)(383 10341)(467 4670)(523 31903)(853 34973)(4337 13011)(4373 8746)(4507 9014)(4561 9122)(4691 28146)(4733 18932)(4967 -39736)(5437 16311)(9697 38788)(37547 37547)Thing
    

    Which is apparently the correct output with "Thing" appended. Others have suggested that these issues are usually caused by segfaults but I am not sure that that is the case here. Clearly it is possible to pass this kata in c++ but I am not sure why I am failing.