Problem 47 --- with no brainer and fast solution