Large optical nonlinearity of semiconducting single-walled carbon nanotubes under resonant excitations