Free notebooks were distributed equally among children of a class. The number of notebooks each child got was one-eighth of the number of children. Had the number of children been half, each child would have got 16 notebooks. How many notebooks were distributed in all?
Choose the correct choice from the following options.
A) 432
B) 640
C) 256
D) 512
E) none of these

Rationale: "in case i : let the no . of children = x . hence , total no . of notebooks distributed 1 ⁄ 8 x . x or x 2 ⁄ 8 . . . . . . . ( i ) in case ii : no . of children = x ⁄ 2 now , the total no . of notebooks = 16 × x ⁄ 2 . . . . . . . ( ii ) comparing ( i ) & ( ii ) , we get x 2 ⁄ 8 = 8 x or , x = 64 hence , total no . of notebooks = 64 × 64 / 8 = 512 answer d"
Answer: D