{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ch1\u003e\u003c/h1\u003e\n\n\u003cp\u003e\nWrite a program which finds the greatest common divisor of two natural numbers \u003ci\u003ea\u003c/i\u003e and \u003ci\u003eb\u003c/i\u003e\n\u003c/p\u003e\n\n\u003ch2\u003eInput\u003c/h2\u003e\n\n\u003cp\u003e\n\u003ci\u003ea\u003c/i\u003e and \u003ci\u003eb\u003c/i\u003e are given in a line sparated by a single space.\n\u003c/p\u003e\n\n\u003ch2\u003eOutput\u003c/h2\u003e\n\n\u003cp\u003e\nOutput the greatest common divisor of \u003ci\u003ea\u003c/i\u003e and \u003ci\u003eb\u003c/i\u003e.\n\u003c/p\u003e\n\n\n\u003ch2\u003eConstrants\u003c/h2\u003e\n\u003cp\u003e\n1 ≤ \u003ci\u003ea\u003c/i\u003e, \u003ci\u003eb\u003c/i\u003e ≤ 10\u003csup\u003e9\u003c/sup\u003e\n\u003c/p\u003e\n\n\u003ch2\u003eHint\u003c/h2\u003e\n\u003cp\u003e\nYou can use the following observation:\n\u003c/p\u003e\n\u003cp\u003e\nFor integers \u003ci\u003ex\u003c/i\u003e and \u003ci\u003ey\u003c/i\u003e, if \u003ci\u003ex\u003c/i\u003e ≥ \u003ci\u003ey\u003c/i\u003e, then gcd(\u003ci\u003ex\u003c/i\u003e, \u003ci\u003ey\u003c/i\u003e) \u003d gcd(\u003ci\u003ey\u003c/i\u003e, \u003ci\u003ex\u003c/i\u003e%\u003ci\u003ey\u003c/i\u003e)\n\u003c/p\u003e\n\n\n\u003ch2\u003eSample Input 1\u003c/h2\u003e\n\u003cpre\u003e54 20\n\u003c/pre\u003e\n\u003ch2\u003eSample Output 1\u003c/h2\u003e\n\u003cpre\u003e2\n\u003c/pre\u003e\n\n\u003ch2\u003eSample Input 2\u003c/h2\u003e\n\u003cpre\u003e147 105\n\u003c/pre\u003e\n\u003ch2\u003eSample Output 2\u003c/h2\u003e\n\u003cpre\u003e21\n\u003c/pre\u003e\n\n\n"}}]}