View Code of Problem 87

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

	return 0;
}

Double click to view unformatted code.


Back to problem 87