Tap here to switch tabs
Problem
Submissions

Problem: Check Digitorial Permutation

Check Digitorial Permutation asks whether rearranging the digits of an integer, without leading zeros, can produce the sum of the factorials of those digits.

Statement

Given an integer n, determine whether there exists a valid permutation of the digits of n that is equal to the sum of the factorials of its digits.

A permutation of digits is considered valid if it does not have leading zeros.

Constraints:

  • 1≤1 \leq n ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check Digitorial Permutation

Check Digitorial Permutation asks whether rearranging the digits of an integer, without leading zeros, can produce the sum of the factorials of those digits.

Statement

Given an integer n, determine whether there exists a valid permutation of the digits of n that is equal to the sum of the factorials of its digits.

A permutation of digits is considered valid if it does not have leading zeros.

Constraints:

  • 1≤1 \leq n ≤109\leq 10^9