//看不懂下面這段實現代碼,求大神解釋一下include<stdio.h>int main(void){int t,a,n,m,d;scanf("%d",&t);while(t--){ scanf("%d %d",&n,&m); if((4*n-m)%2==0) //不明白這個條件是怎么想出來的 { d=(4*n-m)/2; //?? if(d>=0&&d<=n)//不明白這個條件是怎么想出來的 { printf("%d %d\n",d,n-d); }else printf("No answer\n"); }else printf("No answer\n");}
C語言算法題,雞兔同籠求解??
當年話下
2018-11-08 14:10:20