整数解

#include<stdio.h>
#include<math.h>
int main( )
{
 int a,b,t;
 while(scanf("%d%d",&a,&b),a|b)
{
  t=sqrt(a*a-4*b);
  printf(a*a-4*b>=0&&(a*a-4*b-t*t==0)?"YES\n":"NO\n");
 }
return 0;
}
数学题。。

posted on 2011-05-01 09:25  more think, more gains  阅读(209)  评论(0编辑  收藏  举报

导航