DEV Community

Discussion on: I can't stop thinking in this coding problem

Collapse
johnkennedy9147 profile image
John Kennedy

Haven't checked this thoroughly but this might be a solution:

For each preferred number

  • calculate all factors less than or equal to n
  • Add each to a set

Find number of elements in set.