题解 | #鸡兔同笼#
鸡兔同笼
http://www.nowcoder.com/practice/fda725b4d9a14010bb145272cababef1
#include<iostream> #include<cstdio> using namespace std; int main() { int a; while(scanf("%d",&a) !=EOF){ int minimum=0; int maxmum=0; if (a%2==0){ minimum=a/4+(a%4)/2; maxmum=a/2; } printf("%d %d\n",minimum,maxmum); } return 0; }