Given partial information about a jigsaw puzzle, complete the remaining details.
If the information is insufficient to complete the details, or if it contains contradictions, the user should be notified.
The full information about the jigsaw puzzle contains the following parts:
pieces
: Total number of piecesborder
: Number of border piecesinside
: Number of inside piecesrows
: Number of rowscolumns
: Number of columnsaspectRatio
: Aspect ratio of columns to rowsformat
: Puzzle format, which can beportrait
,square
, orlandscape
For this exercise, you may assume square pieces, so that the format can be derived from the aspect ratio:
- If the aspect ratio is less than 1, it's
portrait
- If it is equal to 1, it's
square
- If it is greater than 1, it's
landscape