第一个数是要分类数字的个数,不是要分类的数,应该剔除。哪一类无数字,应输出N。
num = list(int(i) for i in input().split())
a1, a2, a3, a4, a5 = [], [], [], [], []
k = 1
count = 0
sum1, sum2, sum3 = 0, 0, 0
num =num[1:]
for i in num:
if i % 5 == 0:
if i % 2 == 0:
a1.append(i)
sum1 += i
elif i % 5 == 1:
if k % 2 == 0:
i = -i
a2.append(i)
sum2 += i
k += 1
elif i % 5 == 2:
a3.append(i)
count += 1
elif i % 5 == 3:
a4.append(i)
sum3 += i
elif i % 5 == 4:
a5.append(i)
a5.sort(reverse=True)
a5_max = a5[0]
if a1 == []:
sum1 = "N"
if a2 == []:
sum2 = "N"
if a3 == []:
count = "N"
if a5 == []:
a5_max = "N"
if a4 == []:
print(sum1, sum2, count,"N", a5_max)
else:
print(sum1, sum2, count,round(sum3/len(a4),1), a5_max)