Tap here to switch tabs
Problem
Submissions

Problem: Check Divisibility by Digit Sum and Product

Check Divisibility by Digit Sum and Product asks whether an integer is divisible by the total formed by adding its digit sum to its digit product, returning true or false.

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

Check Divisibility by Digit Sum and Product asks whether an integer is divisible by the total formed by adding its digit sum to its digit product, returning true or false.

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