#include<stdio.h> #include<iostream> using namespace std; int main(){ int a1=0,a2=0,a3=0,a5=0; double a4=0; int a4num=0; int n; cin>>n; int x,i=1; while(n--){ cin>>x; switch(x%5){ case 0: if(x%2==0){ a1+=x; } break; case 1: a2+=(i*x);i=-i;//交替求和 break; case 2: a3++; break; case 3: a4+=(double)x; a4num++; break; case 4: if(x>a5) a5=x; break; } } (a1>0)?(cout<<a1<<" "):(cout<<"N"<<" "); (a2!=0)?(cout<<a2<<" "):(cout<<"N"<<" "); (a3>0)?(cout<<a3<<" "):(cout<<"N"<<" "); (a4>0)?(printf("%.1f ",a4/(double)a4num)):(printf("N ")); (a5>0)?(cout<<a5):(cout<<"N"); return 0; }