solve digit factorials