All pastes #985572 Raw Edit

asdf

public text v1 · immutable
·published 2008-04-15 03:17 UTC
rendered paste body
for (i = 1 through n) {
   for (j = 1 through i) {
      for (k = 1 through 5)
         task t
   }
}

innermost: 5*t
j loop: 5*t*i
outermost: 5*t*n*(n+1)/2

Why is (n+1)/2?