Two hundred thousand units are ready, another million on the way

Report a typo

A Jedi decided to produce clones in batches, ensuring that each successive batch would be twice the size of the previous one (i.e. x=2x = 2). How many clones will be released in each iteration to m=6m=6? In other words, what is the expected output when calling the function jedi(2, 6)?

// N.B. this is a pseudocode. Don't expect it to work when running it in some IDE...
function jedi(x, m):
    a[1] = x

    for i in (2, m):          // remember, both ends are included
        a[i] = a[i - 1] * x

    print(a)                  // printing an array, see answer format below

Answer format: 3, 53, 82, 14, 32.

Enter a short text
___

Create a free account to access the full topic