community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!
SOLVED

Challenge #135: Locker Problem

Alteryx Certified Partner
Alteryx Certified Partner

Nice one!

 

Spoiler
Untitled2.png
Bolide

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

 

Spoiler
Macro 135.JPG

 

Workflow 135.JPG

 

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.

Asteroid

Thanks for practice exercise; mod is useful indeed!

Asteroid
Spoiler
Chantelbbr_0-1574723567283.png