杭电ACM1017题,我的代码为什么总是Presentation Error

2024-12-05 03:34:33
推荐回答(1个)
回答1:

Case后面有空格
AC答案:
#include
using namespace std;
int main()
{
// freopen("in.txt","r",stdin);
int n,m,t;
scanf("%d",&t);
while(t--)
{
int kcase=0;
while(scanf("%d%d",&n,&m)!=EOF && n!=0)
{
kcase++;
int a,b,dig=0;
for(a=1; afor(b=a+1; b{
double temp=(double)(a*a+b*b+m)/(a*b);
if((temp-(int)temp)==0)
dig++;
}
cout<<"Case "<}
if(t)
cout<}
return 0;
}