9 15 5 4 1 -56 0 0
No Yes Yes源代码:#include <stdio.h> #include <stdlib.h> int main() { int n,m,i,flag; while(scanf("%d%d",&n,&m)!=EOF && (m||n)) { for(flag=0,i=-9999;i<10000;i++) if(i*(n-i)==m) flag=1; if(flag) printf("Yes\n"); else printf("No\n"); } system("pause"); return 0; }
原文地址:http://blog.csdn.net/zchlww/article/details/41678771