problem c solution