@selina
Good instinct to start with smaller variants of the problem and working your way up.
You've chosen a perhaps confusing way of directly tackling the big length=14 problem, by partitioning it as "how big is the set of 14-digit numbers with exactly that many 2s".
Note that you can start smaller and simpler, by just considering shorter-length numbers first.
As you work the shorter examples, you may see a pattern in construction, or a pattern in the numbers. Either intuition will help you.
Good instinct to start with smaller variants of the problem and working your way up.
You've chosen a perhaps confusing way of directly tackling the big length=14 problem, by partitioning it as "how big is the set of 14-digit numbers with exactly that many 2s".
Note that you can start smaller and simpler, by just considering shorter-length numbers first.
As you work the shorter examples, you may see a pattern in construction, or a pattern in the numbers. Either intuition will help you.
on /blog/97