# How many cubes are crossed by the diagonal (if HCF is not 1)?

There is a big cube of dimension 110 * 154 * 385 made up of smaller 1 * 1 * 1 dimension cubes. A body (main) diagonal is drawn. How many smaller 1 * 1 * 1 cubes will it cut?

• You may first want to try this already posted question before coming to this one: puzzling.stackexchange.com/questions/53313/… – user41433 Nov 2 '17 at 5:01
• i like the question but why did u answer it by urself? – Oray Nov 2 '17 at 7:08
• why do people think this is off-topic? I believe this is a good puzzle question in some way. – Oray Nov 2 '17 at 7:18
• It's off topic because this is a standard maths question. I mean, this idea is not even original – Wen1now Nov 2 '17 at 9:15
• A cube with dimensions 110 × 154 × 385?  Surely you mean a rectangular parallelepiped, a.k.a. a rectangular cuboid.  … … … …  P.S. What does the Hamilton Community Foundation (in Ontario, Canada) have to do with this puzzle?  (I assumed that you weren’t talking about the Hawaii Correctional Facility.) – Peregrine Rook Dec 31 '17 at 7:59

Above answer is brilliant! Another way to approach this kind of question is: first take HCF to shrink the big cube into the smallest one with same ratio on 3 dimensions. Usually the smallest cub is manageable; then take the shadow of body (main) diagonal on each of 3 faces. It will reduce to standard # of squares cut by diagonal on each rectangle; then mark the square which got crossed on 3 faces. It will help figure out # of cubs to be crossed. It takes more time this way if you dcan't remember the formula above

• I don't really understand; could you elaborate further? Thanks – Wen1now Jan 1 '18 at 3:59

Since there has not been any response as of now, here is my solution without a lot of explanation.

For this question, the answer must be: (HCF(x,y,z)) * (1 + (a-1) + (b-1) + (c-1) - (HCF(a,b) - 1) - (HCF(a,c) - 1) - (HCF(b,c) - 1))

where a = x/(HCF(x,y,z) and so on.

or,

11 * (1+9+13+34-1-4-6) = 506

• You posted your answer 2 hours and 14 minutes after you posted the question!  Stack Exchange has users all around the world, in different time zones, and people who are in the same time zone may have different daily schedules / rhythms (e.g., might work the night shift).  You should wait 24 to 48 hours before posting your answer to your own question. … … … … P.S. Answers “without a lot of explanation” are not popular here.  In case my comment on the question was too subtle for you: You should say what HCF is. – Peregrine Rook Dec 31 '17 at 7:59