COOK104B - UCL problem NZEC error

Hi,

I have tried the UCL problem in COOK104B and I am getting an NZEC error. The testcases I tried seem to work perfectly. Please help me to figure out where I am going wrong.

My code

Thanks
Aadarsh…