nums = input().split()
nums = list(map(int, nums))
nums.pop(0)
def solutions_A1(nums):
ans = []
for num in nums:
if num % 5 == 0 and num % 2 == 0:
ans.append(num)
return sum(ans) if sum(ans) != 0 else 'N'
def solutions_A2(nums):
ans = 0
res = []
for num in nums:
if num % 5 == 1:
res.append(num)
for i in range(0, len(res), 2):
if i + 1 < len(res):
ans += res[i] - res[i + 1]
else:
ans += res[i]
return ans if len(res) != 0 else "N"
def solutions_A3(nums):
cnt = 0
for num in nums:
if num % 5 == 2:
cnt += 1
return cnt if cnt != 0 else "N"
def solutions_A4(nums):
cnt = 0
Sum = 0
for num in nums:
if num % 5 == 3:
cnt += 1
Sum += num
return "N" if cnt == 0 else "{:.1f}".format(Sum / cnt)
def solutions_A5(nums):
ans = 0
for num in nums:
if num % 5 == 4:
ans = max(ans, num)
return ans if ans > 0 else "N"
ans1 = solutions_A1(nums)
ans2 = solutions_A2(nums)
ans3 = solutions_A3(nums)
ans4 = solutions_A4(nums)
ans5 = solutions_A5(nums)
print(f"{ans1} {ans2} {ans3} {ans4} {ans5}")
11-08
470
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)