Numbrix Solution C++