Update brainteaser.cpp