Use of max

Can somebody please explain me the use of max while storing the input in list a in this solution

Correct Solution - https://www.codechef.com/viewsolution/29868581

My Solution - https://www.codechef.com/viewsolution/35593978

Note -> the c variable input is always greater than 1

P.S. - I wrote the same answer without max and got a wrong answer

Please Help