View Code of Problem 87

#include <stdio.h>
int main()
{
	int x,min,max;
	scanf("%d",&x);
	if(x%2==0){
		min = x/4;
		if(x%4==2)//可以被2整数,只可能余2; 
        	min++;
		max = x/2;
		printf("%d %d",min,max);
	}else{
		printf("0 0");
	}
    return 0;
}

Double click to view unformatted code.


Back to problem 87