Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Firstx solution in Clear category for Even the Last by artur_mierzwa
def checkio(array):
if not array:
return 0
if len(array)==0 and array[0]==0:
return 0
if len(array)==0 and array[0]!=0:
return array[0]*array[0]
if len(array)>0:
y=0
for x in range(0,len(array),2):
y+=array[x]
return y*array[len(array)-1]
Oct. 15, 2016