• Custom User Avatar

    Hang in there. I wrote it in 15 lines of code, because I want to practice the actual programming logic, not "code-golfing" to solve it with an extra bit of mathematical knowledge gained from thinking through any possible shortcuts. I use these kattas to become a more logical, practiced programmer. If some want to use it for code-golf with a simple math formula, that's cool. But remember, every minute of practice you put yourself through makes you a better programmer.

  • Custom User Avatar

    In most languages you probably couldn't even capture the output if it was printed other than PHP with ob_start and ob_get_clean.

  • Custom User Avatar

    I think there is no kata where you have to print something.

  • Custom User Avatar

    please edit this to say "return the sum", it is unclear whether you need to return or print it.

  • Custom User Avatar

    I spent time to make a recursive function, try to rebuild the triangle and try many solutions. Then, suddenly I think:"wtf am i doing?", and then i wrote the solution in 6 lines :v but when i looked at the best solution, i wanted to give up progamming immediately

  • Custom User Avatar

    Not a suggestion. Posting solutions is a violation of the CW's CoC.

  • Custom User Avatar
  • Custom User Avatar

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