# Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
###### IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
SOLVED

## Challenge #135: Locker Problem

Alteryx Certified Partner

Nice one!

Spoiler
13 - Pulsar

My solution   ...as John Bender runs down the hall, closing lockers, singing, "I wanna be an Airborne Ranger..."

Spoiler

5 - Atom

There is an intuition to this solution rather than relying on macros as I have done.

Spoiler
Locks that will be open are those with an odd number of factors (numbers that divide it).

As factors come in pairs, the only way a number can have odd number of factors is if one factor pairs with itself, ie the number is a (perfect) square.

Then it just all the squares upto N.

Generate rows upto SQRT(N) then square each number.

But that's too much maths and Alteryx is more fun!
Alteryx Partner

Finally able to attach files.

8 - Asteroid

Thanks for practice exercise; mod is useful indeed!

8 - Asteroid
Spoiler
8 - Asteroid

Solution attached.

Spoiler
8 - Asteroid

Getting good practice with iterative macros.

Spoiler
Spoiler:
Spoiler
Spoiler:
8 - Asteroid

My Solution:

5 - Atom

my solution