MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply TodayGiven the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

3605 correct solutions
2377 incorrect solutions

Last solution submitted on May 25, 2016

10 players like this problem

1 Comment

Sa'di Altamimi
on 21 May 2016 at 20:05

try: y=sum(1:2^x). It will lead to shorter solution.

1 Comment

Michael Kobylarek
on 12 May 2016 at 3:55

not sure why this is wrong.

1 player likes this solution

2 players like this solution

1 Comment

Dimitris Kaliakmanis
on 15 Oct 2013

How this solution is possible?

3 players like this solution

1 Comment

David Young
on 9 Feb 2012

A good example of a solution that does well on Cody's size measure, but which I wouldn't use for serious purposes.

3 Comments