Ad
  • Default User Avatar

    Thanks for the hint. It was so slow. Optimized and passed the tests. Fun one, thanks for the tips.

  • Default User Avatar

    After doing more testing, I think my solution is just too slow. I put in the test cases and get the right answer, but the higher the numbers get, the longer it takes to spit out the solution. So I think I'm just timing out.

  • Default User Avatar

    I understand I shouldn't have a main, I was just using that for testing my functions. I was hoping to be able to post my functions into the skeleton and figure out how to get them to work. I just think I'm having a problem with the formatting because the sensei has created a namespace for the answer and I'm just not familiar with creating a namespace.
    I think I'll keep working on it before I post the code. I've just gotten lazy at this point. I'll try making my own namespace with the functions in the namespace.
    Thanks

  • Default User Avatar

    Trying to solve with C++. I've created functions that perform the smaller tasks and I can't seem to get them formatted correctly on the training page to test.
    I think it is the namespace that is throwing me off. Can I post my code for help?
    Code currently consists of:
    -includes
    -function prototypes
    -main with one line of code
    -four function definitions
    Thanks in advance.