View Code of Problem 87

#include<stdio.h>
#include<math.h>
int main(){ 
  int a,max,min;
  scanf("%d",&a);
  if(a%2==0){
  	if(a%4==0){
  		min=a/4;
  		max=a/2;
	  }
	else{
		max=a/2;
		min=a/4+1;
	}
  }
  else {
  	max=0;
  	min=0;
  }
  printf("%d %d\n",min,max);
	return 0;
} 

Double click to view unformatted code.


Back to problem 87