# Return to Revisions

7 of 7 deleted 9 characters in body

# C (gcc), 131, 116, 90, 89, 87 bytes

L(l,a,v,A){for(A=5,v=1e3;A--;v-=a)printf("%d\n"+!a*2,a=l>59|A<3&l>44?rand()%-~v:!A*v);}


Try it online!

Update: Fixed a bug in the original. Fused in the helper function, reducing an additional 15 bytes.

Update 2: -25 bytes thanks to ErikF.

Update 3: -1 byte thanks to ceilingcat.

## Degolf

L(l,a,v,A){
for(A=5,v=1e3;A--;v-=a)
printf("%d\n"+!a*2, // No clue how this works anymore, but it'll advance the pointer
// to the string constant when a number shouldn't be printed.
a=l>59|A<3&l>44?rand()%-~v // Random integer to print in [0, v]
:!A*v); // If bottom layer, return remaining volume
}

 answered Sep 11 '18 at 17:18 user77406