$10 (via MCM item**) for Bored Nerds

Status
This thread has been locked.

Ally

gσ∂∂єѕѕ σƒ мαтнѕ αη∂ мєℓσηѕ χσ
Supreme
Feedback score
37
Posts
2,045
Reactions
2,194
Resources
0
Thread Title
$10 (via MCM item**) for Bored Nerds

Prize name
Up to $10 in upgrades, name colour(s) or medals on mcm

Requirements and other relevant information
Observe the following C# code: https://cloud.ally.ws/s/wXfbHXnj5Wzqtot/preview

I have a function called GiveMeMyNumber.

I want to know several things.

If I pass in the following numbers to it: 3, 1, 2 and 0 - what do I get? (Easy*)

Then - if I pass in the number 5 - what do I get? (Hard*)

Tips for solving this problem:
- What is the 'getPolyComponent' function?
- What is the 'getRootProduct' function?
- What could a seemingly random array of tuples in GiveMyNumber possibly represent?
- Make sure you have a C# compiler and/or IDE at the ready. Try changing the problem and breaking through it to see what it could possibly be doing.
- Don't get flustered if you can't find solutions right away. This *is* a very mathematical programming problem.

Extras:
- For no extra prize whatsoever - if there is a definitive formula for this hardcoded example, tell me what it is in terms of an input variable, such as 'n', or 'x'. If one doesn't exist, tell me why it doesn't exist.
- You can work collaboratively. If you choose to, list your group's contributions and decide on how you'd split the reward.
- The contest ends either at the specified end date, or when the first person solves this solution AND posts it to the thread. First come first serve.

End date
Aug 16, 2021

If award date is different from contest end date, please specify.
 

Ally

gσ∂∂єѕѕ σƒ мαтнѕ αη∂ мєℓσηѕ χσ
Supreme
Feedback score
37
Posts
2,045
Reactions
2,194
Resources
0
Sorry, to clarify:

You need to show *why* the function values are what they are. You can't just program it then run the code for 3,1,2,0,5. (If showing a formula is part of your solution, then please do so).
 

Ally

gσ∂∂єѕѕ σƒ мαтнѕ αη∂ мєℓσηѕ χσ
Supreme
Feedback score
37
Posts
2,045
Reactions
2,194
Resources
0
Oh well. Contest over.
 
Status
This thread has been locked.
Top