Patients were randomly assigned in a 1:1:1:1 ratio to receive ledipasvir and sofosbuvir in a fixed-dose combination tablet once daily for 12 weeks , ledipasvir-sofosbuvir plus ribavirin for 12 weeks , ledipasvir-sofosbuvir for 24 weeks , or ledipasvir-sofosbuvir plus ribavirin for 24 weeks .