pat(B) 1012. 数字分类

代码:

#include
#include
#include
#define INF 1<<30
using namespace std;

int a[1005];

int main()
{
	int n;
	int i,j;
	while(scanf("%d",&n)==1)
	{
		int ans1=0,ans2=0,ans3=0,ans5=-INF;
		double ans4;
		int s=0;
		int cnt=0;
		int k=0;
		for(i=0;ians5)
				{
					ans5=a[i];
				}
			}
		}
		ans4=s*1.0/k;
		if(ans1==0)
			printf("N ");
		else
			printf("%d ",ans1);
		if(cnt==0)
			printf("N ");
		else
			printf("%d ",ans2);
		if(ans3==0)
			printf("N ");
		else
			printf("%d ",ans3);
		if(k==0)
			printf("N ");
		else
			printf("%.1lf ",ans4);
		if(ans5==-INF)
			printf("N\n");
		else
			printf("%d\n",ans5);
	}
	return 0;
}


你可能感兴趣的:(ACM)