Skip to content

Instantly share code, notes, and snippets.

@jonesor
Created September 3, 2014 16:16
Show Gist options
  • Save jonesor/3141b31cc5f3920b4830 to your computer and use it in GitHub Desktop.
Save jonesor/3141b31cc5f3920b4830 to your computer and use it in GitHub Desktop.
Squares <- 1:64
RiceOnASquare = 1
for (i in 2:64){
RiceOnASquare = append(RiceOnASquare,RiceOnASquare[i-1]*2)
}
sum(RiceOnASquare)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment