鸡兔同笼问题c语言不知道哪里有错

Chicken and Rabbit Cage
Chicken and Rabbits are in the same cage, the total heads of them is m, the total legs of them is n.
Input m and n; <=100000000;
Output the number of chicken and rabbit.
If the number isn't right , output "You count wrong!"
Input
input two integers m and n;
Output
two integers:the number of chicken and rabbits.
Sample Input
14 32
Sample Output
12 2
代码:
#include <stdio.h>

int main(){
int m,n,chi,rab;
scanf("%d %d", &m , &n);
if(n % 2 !=0 || n <= 2m || n >= 4m){
printf("You count wrong!");
return 0;
}
for(chi = 1; chi <= m; chi++){
for(rab = 1;rab <= m;rab++){
if(2*chi + 4 * rab == n && chi + rab == m){
printf("%d %d",chi,rab);
break;
}

    }
    }
    return 0;

}为什么我这个提交上去显示答案错误

1、上述做法不够严谨, 首先m,n是可以等于0的,并且得大于0,要么采用无符号形,另外根据题目得加入<=100000000的判断
2、用1层循环就可以了, rab = m - chi,并且循环从0开始(2重循环也没错,性能低)