Skip to content

Instantly share code, notes, and snippets.

@LSStaff
Created January 16, 2018 06:47
Show Gist options
  • Save LSStaff/279830ff9c23e3d2fd71ce48bde4d43a to your computer and use it in GitHub Desktop.
Save LSStaff/279830ff9c23e3d2fd71ce48bde4d43a to your computer and use it in GitHub Desktop.

Validation

Example 1

Inputs:

  • Target number: 20
  • Factors: [3, 5]

Output

  • 78

Example 2

Inputs:

  • Target number: 20
  • Factors: [3]

Output

  • 63

Example 3

Inputs:

  • Target number: 20
  • Factors: [5]

Output

  • 30

Example 4

Inputs:

  • Target number: 20
  • Factors: []

Output

  • 78

Example 5

Inputs:

  • Target number: 1
  • Factors: []

Output

  • 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment