prob004, 1 optimization