Ad
  • Custom User Avatar

    30 bytes is a bit excessive. "Hello World\0" is 12 characters long.

  • Custom User Avatar

    JaywalkerZA,

    Your instructions say:
    "Please write me a function that will return the shortest amount of button presses to get to the given time (As displayed on the screen)."

    This to me means that if I'm given say "01:30" then the "shortest amount of button presses to get the given time" is 3 or "90" and enter. The instructions are not clear.

    I've hard coded my answers for "01:05" and "01:23" because it was not clear that you wish for us to write the input exactly. You should provide "01:01" as an example test case for this to be clear to future participants.

  • Custom User Avatar

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

  • Custom User Avatar

    I have a problem with C when running the tests for submission. Using the following tester main() function:

    int main(void) {
      int x = rowSumOddNumbers(-42);
    
      printf("x = %d\n", x);
    
      return 0;
    }
    

    When tested in the terminal I get:

    chris@DESKTOP-JF0A2G8:~/src$ ./a.out
    x = -74088
    

    The answer is correct yet I fail on the fifth test.

    the_multiply_function
      should_pass_all_the_tests_provided
    ✔ Test Passed
    ✔ Test Passed
    ✔ Test Passed
    ✔ Test Passed
    ✘ The expression (rowSumOddNumbers(-42)) == (-74088) is false.
    
  • Custom User Avatar

    I have the same problem with C with the following output:

    int main(void) {
      int x = rowSumOddNumbers(-42);
    
      printf("x = %d\n", x);
    
      return 0;
    }
    

    When tested in the terminal I get:

    chris@DESKTOP-JF0A2G8:~/src$ ./a.out
    x = -74088
    

    The answer is correct yet I fail on the last test.

    the_multiply_function
      should_pass_all_the_tests_provided
    ✔ Test Passed
    ✔ Test Passed
    ✔ Test Passed
    ✔ Test Passed
    ✘ The expression (rowSumOddNumbers(-42)) == (-74088) is false.
    
  • Custom User Avatar

    I think that I understand it better now. For those who are still uncertain I think the pattern is as follows:
    27 -> base26 = 11.
    printf("%c%c", allow[1], allow[1]);

    Whenever another 26 gets added (for base26) we add a digit to the second column. Similar to how hexadecimal works.

    52 following this pattern would equal 20 so "ca".

  • Custom User Avatar

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