View Code of Problem 87

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main (){
	int n, x, y;
	scanf("%d", &n);
	if(n%2==0){
		y = n/2;
		if(n%4==0) x = n/4;
		else x = n/4+1;
	}else{
		x = 0;
		y = 0;
	}
	printf("%d %d\n", x, y);

	return 0;
}

Double click to view unformatted code.


Back to problem 87