alteryx Community

# Weekly Challenges

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

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

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

## Challenge #275: Greatest Common Denominator

Alteryx

A solution to last week's challenge can be found here.

This week's challenge was submitted by @Qiu  - thanks for your submission!

Stuff! We all buy stuff, and sometimes we buy multiple stuffs. You might even go so far as to say we buy quantities of stuff. But beware, businesses also buy stuff and usually in larger quantities than individuals. And since they are businesses, they keep records of the stuff they buy and even analyze those records on occasion…

The input file for this week’s challenge contains some historic orders of two different materials. Determine the Greatest Common Denominator (GCD) of the past orders for each material to better understand any potential patterns.

17 - Castor

Here's my attempt!

Spoiler

11 - Bolide

Fun challenge!

Spoiler
16 - Nebula

Nice challenge to start this week. Challenge #275 is done!

Spoiler

9 - Comet

Fun challenge!

Spoiler

Spoiler
Spoiler
17 - Castor

Good one to start the week! My solution below:

Spoiler
13 - Pulsar

@Qiu,  Congratulations!
It's a fun challenge!

Spoiler

16 - Nebula

Great challenge @Qiu !

Spoiler
Workflow:

Iterative macro, Euclidean algorithm:

16 - Nebula

The Eucliden Algorithm using an iterative macro for me.

Spoiler
1. Is mod(a,b) == 0
2a. If yes, then factor.
2b If no, a = b and b = remainder
3. repeat step 1

workflowmacro

And in the Python Tool

Spoiler

13 - Pulsar

Fun challenge to start the week! Here is my solution.

Spoiler

Cheers!

Phil