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.

3171 correct solutions
1915 incorrect solutions

Last solution submitted on Feb 14, 2016

9 players like this problem

1 Comment

Ron
on 29 Dec 2015

Colon notation is key.

1 player likes this solution

1 Comment

Dimitris Kaliakmanis
on 15 Oct 2013

How this solution is possible?

1 Comment

Kuifeng
on 31 Mar 2012

This solution can accept arrays of integers as x input

2 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