update SRM597_div2_2.cpp: one easier approach