
Unpack an archive layer by layer, stopping before the size goes over budget.
Around 2001 somebody posts a 42 kilobyte file called 42.zip. Unpack it and you get 16 archives, unpack those and each gives you 16 more, five layers down, until 4.5 petabytes of zeroes are landing where your disk used to be. It was built to show what a scanner does when it opens whatever it is handed. Nothing crashed that day. The answer has always been to count the bytes on the way down and stop.
layers(42, {10,10,10,10,10}, 5, 1000000)Expected result
4For your own tracking. Tests grade your code.
layers(5, {2}, 1, 10)Expected result
1layers(5, {2}, 1, 9)Expected result
0Expected files
unpack.cAllowed functions
None. Write every helper yourself.
