Tap here to switch tabs
Problem
Submissions

Problem: Check Divisibility by Digit Sum and Product

med
30 min
Try to solve the Check Divisibility by Digit Sum and Product problem.

Statement

Given an integer n, determine whether n is divisible by the sum of the sum of its digits and the product of its digits.

Return true if n is divisible by this total, and false otherwise.

Constraints:

  • 1≤1 \leq n ≤106\leq 10^6

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check Divisibility by Digit Sum and Product

med
30 min
Try to solve the Check Divisibility by Digit Sum and Product problem.

Statement

Given an integer n, determine whether n is divisible by the sum of the sum of its digits and the product of its digits.

Return true if n is divisible by this total, and false otherwise.

Constraints:

  • 1≤1 \leq n ≤106\leq 10^6