You are viewing a single comment's thread. Return to all comments →
Solution in C
int height = 1, springs = n/2 + n%2, summers = n - springs; for (; springs > 0; springs--) { height *= 2; if(summers > 0) height++, summers--; } return height;
Seems like cookies are disabled on this browser, please enable them to open this website
Utopian Tree
You are viewing a single comment's thread. Return to all comments →
Solution in C