Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

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.

SUBMIT YOUR IDEA

Challenge #275: Greatest Common Denominator

AYXAcademy
Alteryx
Alteryx

A solution to last week's challenge can be found here.#275_image.PNG

 

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.

patrick_digan
17 - Castor
17 - Castor

Here's my attempt!

Spoiler
patrick_digan_0-1625578518138.png

 

Aaron_Harter
11 - Bolide

Fun challenge!

Spoiler
0.PNG
AngelosPachis
16 - Nebula

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

 

Spoiler
AngelosPachis_0-1625578827767.png

 

DeanWest
9 - Comet

Fun challenge! 

 

Spoiler
challenge_275_solution_DeanWest-snippet-1.PNG
Spoiler
challenge_275_solution_DeanWest-snippet-2.PNG
Spoiler
challenge_275_solution_DeanWest-snippet-3.PNG
alexnajm
17 - Castor
17 - Castor

Good one to start the week! My solution below:

Spoiler
challenge_275_start_file_Alex Abi-Najm.PNG
DaisukeTsuchiya
14 - Magnetar

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

Spoiler
キャプチャ.JPG

 

 

RolandSchubert
16 - Nebula
16 - Nebula

Great challenge @Qiu !

 

Spoiler
Workflow:
W275.jpg
Iterative macro, Euclidean algorithm:

M275.jpg
PhilipMannering
16 - Nebula
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

workflowworkflowmacromacro


And in the Python Tool

Spoiler
PhilipMannering_0-1625582489672.png

 

Maskell_Rascal
13 - Pulsar

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

 

Spoiler
Maskell_Rascal_0-1625582842373.png

 

Cheers!

Phil