I found about Code Golf after writing this program and decided to post the rules here so you can try it out too. I saw this, which is a less restrictive version of my question. I've got a bit more rules which (in my opinion) make the task quite a lot more tougher.
Title says it all. If the input is 8
, we should get:
8 = 8
8 = 7 + 1
8 = 6 + 2
8 = 6 + 1 + 1
8 = 5 + 3
8 = 5 + 2 + 1
8 = 5 + 1 + 1 + 1
8 = 4 + 4
8 = 4 + 3 + 1
8 = 4 + 2 + 2
8 = 4 + 2 + 1 + 1
8 = 4 + 1 + 1 + 1 + 1
8 = 3 + 3 + 2
8 = 3 + 3 + 1 + 1
8 = 3 + 2 + 2 + 1
8 = 3 + 2 + 1 + 1 + 1
8 = 3 + 1 + 1 + 1 + 1 + 1
8 = 2 + 2 + 2 + 2
8 = 2 + 2 + 2 + 1 + 1
8 = 2 + 2 + 1 + 1 + 1 + 1
8 = 2 + 1 + 1 + 1 + 1 + 1 + 1
8 = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1
Unique means this 7 + 1
and this 1 + 7
is not allowed.
Lexical order means members must be sorted in descending order by the first addend. If their first addend is equal, sort them by their second addend, etc.
Objective
Lowest size program wins.
I'll post my solution after a few days or after a few of you have posted yours. Have fun!