good for brain !
The best problem of the CUP challenge.
I think that thematic challenge is a wonderful idea. I solved this one with a great pleasure.
Great problem. So many ways to solve it. It was fun trying different methods to see which scored the best.
The connection of this problem with the Fibonacci sequence is most interesting.
indeed: like!
Very interesting problem!
Interesting problem....!
Interesting!!
Good one :)
Combining the Fibonacci sequence and the Pythagorean theorem is a nice idea
I thought I had the right code and it didn't work. Then I realized that the area of the first triangle (n=1 case) should be 0.5*4*3 = 6. But is given in the solution as 25. Am I understanding this wrong? I thought the three sides of the first triangle (n=1) was 3,4,5 and we go on from there. Please let me know if my understanding is wrong and then I can proceed Otherwise I have a general code.
@ Dhaval: Try reading the last sentence of the problem very carefully.
@Milan Petrovic: Thank you, I completely missed that; silly me. Now I got it to work :)
Good problem. Kinda fun too.
Definitely needed to read that last line carefully. Like at least one other here, I misread it.
can someone help me with this problem?
tough but fun... had issues with assertion at first through
Does Cody not recognize the Fibonacci function?
Can anybody PLEASE send me the solution of this problem? My e-mail is: anthonydavid72@hotmail.com
so interesting!
Nice one! Makes you think, and then the solution is simple and elegant.
It was a really great problem to solve. For me doing the steps as mentioned on paper helped a lot for proper visualization of the problem, and to understand the flow.
Thanks Tanya Morton for the problem exercise.
Very elegantly done!
Very very interesting problem. It introduces the importance of integer sequences.
Why I cannot use the matlab's fibonacci function here? It was Introduced in R2017a. My local PC's matlab and moble matlab can work it out well. Kind of strange.
@Jaya Lee: Cody does not support toolbox functions.
I am so lost
nice
Emphasis on the importance of Fibonacci sequence
Great problem. Used a linear algebra approach with this resource:
https://web.media.mit.edu/~holbrow/post/calculating-fibonacci-numbers-with-matrices-and-linear-algebra/
GOOD question
Nice!
Interesting way to solve
Dear Cody Team,
solutions like mine shall be not allowed.
Elegant brain teaser and a good reminder to always read the question carefully...
And now, nobody will ever see it. You should have, at least, posted it.
Can you please delete this answer?
When I click on "leading solution", I get this solution, which is of no use.
Seems broken, when using Fibonacci ratio it won't work so I have botched it instead
So Exciting !
Finally made it :D ... Fibonacci sequence !
please help me out in understanding the problem
Didn't understand question
Attention to the last line!
Double fibonacci sequence, subtle! I love this problem!
If anyone cares to point out why this is wrong, I'm open to hearing.
Note that the ratio of consecutive areas is asymptotically the golden ratio, i.e., phi=(1+sqrt(5))/2.
Weak! My recursion solution should work just fine, but the server is unable to evaluate it properly. I'm going to count it.
Its the best way that I found :)
I think it is the only way to solve this Problem. We Need to get the sides of nth triangle and ist done.
I consider my answer as a cheat
Yeah, you have just copied the required values of the test suits.
Interesting... (not a reflection on this particular solution but cody in general) - most of the lowest scored answers could be entries in an "obfuscated code" contest.
I'm curious how all these "Size 10" solutions look like. I don't get even close to this value. I terms of education, it would be great to see example codes which are able to go this low.
Brilliant !
I join you @Eugen, it would be great to share some "Size 10" solutions samples.
yes, this is probably cheating
353 Solvers
Increment a number, given its digits
586 Solvers
Return unique values without sorting
677 Solvers
Set the array elements whose value is 13 to 0
1055 Solvers
286 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!