An interview question

A person has N number of piles of sandwiches and he can eat V number of sandwiches per hour if a pile contains less than V number of sandwiches then he will eat all of them in that pile and he should go to another pile after an hour means he should give only one hour to each of the piles .he has K hours to eat whole sandwiches find the V
speed at which he can eat all sandwiches in time K.
input:N number of piles
N integers denoting number of sandwiches in each pile
K time
input: 4
output: 6

if there are any similiar questions please let me know.

Thank You :slight_smile:

can anyone please explain me the solution to