3 ms·
This is probably not in the spirit of the pseudocode, but I expected that each loop would only execute twice, because the initializer part of each loop (a=n,b=n
by techiferous 16y ago
This is probably not in the spirit of the pseudocode, but I expected that each loop would only execute twice, because the initializer part of each loop (a=n,b=n,c=n,d=n) would be evaluated only once at the start of each loop, so all variables would be set to 2.
- daeken 16y agoIt's executed once at the start of each loop, but 'n' changes each iteration. That makes it grow at an insane rate.
- techiferous 16y agoOh, right. The initializers of the inner loops will get reevaluated. Thanks. :)