View Code of Problem 87

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

Double click to view unformatted code.


Back to problem 87