Beta

Find the Next Powers Higher than a Given Value With Given Constraints

Description
Loading description...
Fundamentals
Data Structures
Algorithms
Mathematics
Logic
Strings
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    All of them have [2, 3, 6, 7] as factors

    The actual requirement is "all of them have 2 * 3 * 6 * 7 as factors".

  • Len512 Avatar

    I have trouble understanding this random test case:

    For val = 1220, pow = 3, am_fact = 4, k = 3: 
    
    [8000, 64000, 125000] should equal [8000, 64000, 216000]
    

    The first 4 proper divisors of 1220 are: [2, 4, 5, 10]

    Why is 125000 not included in the results? It is a perfect cube (50 ^ 3 = 125000), and 2^3 * 5^6 = 125000

    Is there another requirement I am missing?