IBM interview question

The aptitude test was a bit difficult