Combinations with repetitions/Square digit chain: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
The purpose of this task is to combine these tasks as follows: |
The purpose of this task is to combine these tasks as follows: |
||
:The |
:The collections of k items will be taken from [0,1,4,9,16,25,36,49,64,81] and must be obtained using code from [[Combinations with repetitions]]. The collection of k zeroes is excluded. |
||
:For each |
:For each collection of k items determine if it translates to 1 using the rules from [[Iterated digits squaring]] |
||
:For each |
:For each collection which translates to 1 determine the number of different ways, c say, in which the k items can be uniquely ordered. |
||
:Keep a running total of all the values of c obtained |
:Keep a running total of all the values of c obtained |
||
:Answer the Project Euler Task #92 question. |
:Answer the Project Euler Task #92 question (k=7). |
||
:Answer the equivalent question for k=8,11,14. |
|||
:Optionally answer the question for k=17. These numbers will be larger than the basic integer type for many languages, if it is not easy to use larger numbers it is not necessary for this task. |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |