You are given an integer n representing the total number of playing cards.
A house of cards is constructed according to the following rules:
It is composed of
Each row consists of some positive number of triangles. A single triangle is formed by leaning
In a row containing
Every row above the bottom row must have strictly fewer triangles than the row directly below it.
The structure must use all n cards.
Return the total number of distinct valid houses of cards that can be built using exactly n cards.
Constraints:
n
You are given an integer n representing the total number of playing cards.
A house of cards is constructed according to the following rules:
It is composed of
Each row consists of some positive number of triangles. A single triangle is formed by leaning
In a row containing
Every row above the bottom row must have strictly fewer triangles than the row directly below it.
The structure must use all n cards.
Return the total number of distinct valid houses of cards that can be built using exactly n cards.
Constraints:
n