Problem D
House of Cards

The house will have a triangular shape. The illustration to
the right shows a house of height
For aesthetic reasons, the cards used to build the tower
should feature each of the four suits (clubs, diamonds, hearts,
spades) equally often. Depending on the height of the tower,
this may or may not be possible. Given a lower bound
![\includegraphics[width=0.25\textwidth ]{fig}](/problems/houseofcards/file/statement/en/img-0002.png)
Input
A single integer
Output
An integer, the smallest
Sample Input 1 | Sample Output 1 |
---|---|
2 |
5 |
Sample Input 2 | Sample Output 2 |
---|---|
42 |
45 |