Yes. Courses taken Credit/D/Fail count as non-A grades when it comes time to calculate distinction in the major.