Patients were randomly assigned to receive the NS5A inhibitor ledipasvir and the nucleotide polymerase inhibitor sofosbuvir in a once-daily , fixed-dose combination tablet for 12 weeks , ledipasvir-sofosbuvir plus ribavirin for 12 weeks , ledipasvir-sofosbuvir for 24 weeks , or ledipasvir-sofosbuvir plus ribavirin for 24 weeks .