Ad
  • Custom User Avatar

    Good job! ;)

    Actually running your solution to test its speed it broke on one of the basic tests. Took me a little while to reproduce and understand but if you want to fully complete the kata you might want to check those variation of a basic maze:

    your_nemesis = []
    
    your_nemesis.append([
      '##########',
      '#        #',
      '# #####  #',
      '# #   #  #',
      '# # #^#  #',
      '# # ###  #',
      '# #      #',
      '# ########'
    ])
    
    your_nemesis.append([
        '# ########',
        '# #      #',
        '# # ###  #',
        '# # #^#  #',
        '# #   #  #',
        '# #####  #',
        '#        #',
        '##########'
    ])
    

    In these cases your program seems to think that the maze is unsolvable and returns [].

  • Custom User Avatar

    I haven't solved it yet, but maybe because they're not consecutive?

    The Primes as a Result of the Longest Consecutive Sum I

  • Default User Avatar

    Thanks !

  • Default User Avatar

    The description says clearly: A natural number is called k-prime if it has exactly k prime factors, counted with multiplicity. You need to know what is a prime number.

    k = 2 -> 4, 6, 9, 10, 14, 15, 21, 22... all these numbers have 2 prime factors (4=22, 6=23, 9=33, 10= 25...); they are 2-primes.
    k = 3 -> 8, 12, 18, 20, 27, 28, 30... all these numbers have 3 prime factors (8=222, 12=223, ...); they are 3-primes.

    When you ask for help, post a question, not an issue.

  • Default User Avatar

    Print the input and you will see the given test.