8. The Wizard of Oz wants to help the Tin Man because he doesn't have a heart. Since there is no spell for such a thing, the wizard will try to create a magic potion that must contain 2 Fly Agaric mushrooms, magic powder, wild rose petals, and some crocodile tears. To find out the amount of magic powder to add, the wizard needs to calculate the greatest common divisor of the spots on the two mushrooms (i.e., if gcd=n, then he will need n grams of magic powder) and to find out the number of petals needed, he must calculate the inverse of his age.
Create an algorithm to help the wizard make the potion.
[
solve in editor]
Author: Marin Gabriela | Code: #65 | Medium