#P1372. 又是毕业季I
又是毕业季I
Description
To make the graduation party better, the teacher wants to select students with the highest compatibility to participate in the rehearsal. But how to choose? The teacher lists all student numbers and believes that the compatibility level of students is their greatest common divisor (this is not superstition~). This is difficult for him, so please help!
PS: The greatest common divisor of a single number is the number itself.
Input Format
Two space-separated positive integers and .
Output Format
A single integer: the maximum compatibility value.
4 2
2
Hint
For of the testdata, , .
For another of the testdata, , .
For of the testdata, , , (a "Shenben" school, many students).
Translated by ChatGPT 5
京公网安备 11011102002149号