Problem 308: (1996 AIME, 14)
A $150\times 324\times 375$ rectangular solid is made by gluing together $1\times 1\times 1$ cubes. An internal diagonal of this solid passes through the interiors of how many of the $1\times 1\times 1$ cubes?
- The diagonal crosses $149+323+374$ grid planes, entering a new cube at each crossing except where two or three planes are crossed at once.
- Count $150+324+375-\gcd(150,324)-\gcd(324,375)-\gcd(150,375)+\gcd(150,324,375)=849-6-3-75+3$.
- $768$. The answer is $\boxed{768}$.
A $140\times 250\times 315$ rectangular solid is made by gluing together $1\times 1\times 1$ cubes. An internal diagonal of this solid passes through the interiors of how many of the $1\times 1\times 1$ cubes?