Official algorithmic problem description and constraints.
Let's call a number a binary decimal if it is a positive integer and all digits in its decimal notation are either 0
0 or 1. For example, 1010111 is a binary decimal, while 10201 and 787788 are not.
Given a number π, you are asked whether or not it is possible to represent π as a product of some (not necessarily distinct) binary decimals.
Detailed video explanations, mathematical intuition, and clean C++ implementation code.