View Code of Problem 87

#include<iostream>
#include<algorithm>
#include<math.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<cstring>
#include<string>
using namespace std;
int main() {
	
	int n,max,min;
	cin>>n;
	if(n%2==0)
	{
	max=n/2;
	min=n/4+n%4/2;
	cout<<min<<" "<<max;	
	}
	else
	{
		cout<<"0 0";
	}
	return 0;

}

Double click to view unformatted code.


Back to problem 87