/*
* @Author: Ray123
* @Description:
* @Date: 2022-01-23 16:51:07
* @LastEditTime: 2022-01-23 16:59:40
* @FilePath: \undefinede:\MyApp\MyAdorableCode\1012.c
*/
#include <stdbool.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>//malloc()
int main()
{
int input;
scanf("%d",&input);
int A1=0;
int B1=0;
int A2=0;
int B2=0;
int A3=0;
int B3=0;
float A4=0.0;
int B4=0;
int A5=0;
int B5=0;
int a=1;
while(input--){
int para;
scanf("%d",¶);
switch(para%5){
case 0:if(para%2==0){
A1+=para;
B1=1;
}break;
case 1:A2+=para*a;a=a*(-1);B2=1;break;
case 2:A3++;B3=1;break;
case 3:A4+=para;B4+=1;break;
case 4:if(para>A5){
A5=para;
B5=1;
}break;
}
}
if(B1==1){
printf("%d ",A1);
}else{
printf("N ");
}
if(B2==1){
printf("%d ",A2);
}else{
printf("N ");
}
if(B3==1){
printf("%d ",A3);
}else{
printf("N ");
}
if(B4!=0){
printf("%.1f ",A4/B4);
}else{
printf("N ");
}
if(B5==1){
printf("%d",A5);
}else{
printf("N");
}
return 0;
}
02-08
1783
02-08
1105
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交