View Code of Problem 87

#include <stdio.h>
int main(void)
{
    int m;
    while(scanf("%d",&m) != EOF)
    {
        int max,min,temp;
        if(m % 2 || !m)
            printf("0 0\n");
        else
        {
            max = m / 2;
            min = m / 4 + m % 4 / 2;
            printf("%d %d\n",min,max);
        }

    }
    return 0;
}

Double click to view unformatted code.


Back to problem 87